From: Brendan Shanks bshanks@codeweavers.com
--- include/wine/exception.h | 8 ++++---- include/winnt.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/wine/exception.h b/include/wine/exception.h index e82bf2ea645..8c91e02e17e 100644 --- a/include/wine/exception.h +++ b/include/wine/exception.h @@ -253,9 +253,9 @@ static inline EXCEPTION_REGISTRATION_RECORD *__wine_push_frame( EXCEPTION_REGIST { #if defined(__GNUC__) && defined(__i386__) EXCEPTION_REGISTRATION_RECORD *prev; - __asm__ __volatile__(".byte 0x64\n\tmovl (0),%0" + __asm__ __volatile__("movl %%fs:0,%0" "\n\tmovl %0,(%1)" - "\n\t.byte 0x64\n\tmovl %1,(0)" + "\n\tmovl %1,%%fs:0" : "=&r" (prev) : "r" (frame) : "memory" ); return prev; #else @@ -269,7 +269,7 @@ static inline EXCEPTION_REGISTRATION_RECORD *__wine_push_frame( EXCEPTION_REGIST static inline EXCEPTION_REGISTRATION_RECORD *__wine_pop_frame( EXCEPTION_REGISTRATION_RECORD *frame ) { #if defined(__GNUC__) && defined(__i386__) - __asm__ __volatile__(".byte 0x64\n\tmovl %0,(0)" + __asm__ __volatile__("movl %0,%%fs:0" : : "r" (frame->Prev) : "memory" ); return frame->Prev;
@@ -284,7 +284,7 @@ static inline EXCEPTION_REGISTRATION_RECORD *__wine_get_frame(void) { #if defined(__GNUC__) && defined(__i386__) EXCEPTION_REGISTRATION_RECORD *ret; - __asm__ __volatile__(".byte 0x64\n\tmovl (0),%0" : "=r" (ret) ); + __asm__ __volatile__("movl %%fs:0,%0" : "=r" (ret) ); return ret; #else NT_TIB *teb = (NT_TIB *)NtCurrentTeb(); diff --git a/include/winnt.h b/include/winnt.h index c810830b2b3..0dae6a05b99 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -2446,7 +2446,7 @@ NTSYSAPI struct _TEB * WINAPI NtCurrentTeb(void); static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void) { struct _TEB *teb; - __asm__(".byte 0x64\n\tmovl (0x18),%0" : "=r" (teb)); + __asm__("movl %%fs:0x18,%0" : "=r" (teb)); return teb; } #elif defined(__i386__) && defined(_MSC_VER) @@ -2471,7 +2471,7 @@ static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void) static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void) { struct _TEB *teb; - __asm__(".byte 0x65\n\tmovq (0x30),%0" : "=r" (teb)); + __asm__("movq %%gs:0x30,%0" : "=r" (teb)); return teb; } #elif defined(__x86_64__) && defined(_MSC_VER)