diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-08-19 03:41:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-08-19 03:41:00 +0000 |
commit | 71a202fc01c3284608f486dd8ebb95bc57203221 (patch) | |
tree | 9f9a278462d30ae35ddc037906c3c7de3b20f59c /eval.c | |
parent | 6d9d1a9bb4086c5ef7208d2c95ac0be6231b7df8 (diff) |
particular symbol for win32_exception_list.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -7222,11 +7222,8 @@ Init_Proc() } /* Windows SEH refers data on the stack. */ +#undef SAVE_WIN32_EXCEPTION_LIST #if defined _WIN32 || defined __CYGWIN__ -# if !(defined _M_IX86 || defined __i386__) -# error unsupported processor -# endif - #if defined __CYGWIN__ typedef unsigned long DWORD; #endif @@ -7237,18 +7234,19 @@ win32_get_exception_list() DWORD p; # if defined _MSC_VER # ifdef _M_IX86 +# define SAVE_WIN32_EXCEPTION_LIST __asm mov eax, fs:[0]; __asm mov p, eax; # endif # elif defined __GNUC__ # ifdef __i386__ +# define SAVE_WIN32_EXCEPTION_LIST __asm__("movl %%fs:0,%0" : "=r"(p)); # endif # elif defined __BORLANDC__ +# define SAVE_WIN32_EXCEPTION_LIST __emit__(0x64, 0xA1, 0, 0, 0, 0); /* mov eax, fs:[0] */ p = _EAX; -# else -# error unsupported compiler # endif return p; } @@ -7271,6 +7269,10 @@ win32_set_exception_list(p) __emit__(0x64, 0xA3, 0, 0, 0, 0); /* mov fs:[0], eax */ # endif } + +#ifndef SAVE_WIN32_EXCEPTION_LIST +# error unsupported platform +#endif #endif static VALUE rb_eThreadError; @@ -7302,7 +7304,7 @@ enum thread_status { struct thread { struct thread *next, *prev; jmp_buf context; -#ifdef _WIN32 +#ifdef SAVE_WIN32_EXCEPTION_LIST DWORD win32_exception_list; #endif @@ -7556,7 +7558,7 @@ rb_thread_save_context(th) th->stk_len = len; FLUSH_REGISTER_WINDOWS; MEMCPY(th->stk_ptr, th->stk_pos, VALUE, th->stk_len); -#ifdef _WIN32 +#ifdef SAVE_WIN32_EXCEPTION_LIST th->win32_exception_list = win32_get_exception_list(); #endif @@ -7672,7 +7674,7 @@ rb_thread_restore_context(th, exit) ruby_current_node = th->node; -#ifdef _WIN32 +#ifdef SAVE_WIN32_EXCEPTION_LIST win32_set_exception_list(th->win32_exception_list); #endif tmp = th; |