diff options
Diffstat (limited to 'sysdeps/mach/x86/thread_state.h')
-rw-r--r-- | sysdeps/mach/x86/thread_state.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/mach/x86/thread_state.h b/sysdeps/mach/x86/thread_state.h index 8c419515f9..e237e46cb2 100644 --- a/sysdeps/mach/x86/thread_state.h +++ b/sysdeps/mach/x86/thread_state.h @@ -34,12 +34,13 @@ #define PC rip #define SP ursp #define SYSRETURN rax +#define MACHINE_THREAD_STATE_FIX_NEW(ts) do { \ + asm ("mov %%cs, %w0" : "=q" ((ts)->cs)); \ +} while(0) #else #define PC eip #define SP uesp #define SYSRETURN eax -#endif - #define MACHINE_THREAD_STATE_FIX_NEW(ts) do { \ asm ("mov %%cs, %w0" : "=q" ((ts)->cs)); \ asm ("mov %%ds, %w0" : "=q" ((ts)->ds)); \ @@ -47,6 +48,7 @@ asm ("mov %%fs, %w0" : "=q" ((ts)->fs)); \ asm ("mov %%gs, %w0" : "=q" ((ts)->gs)); \ } while(0) +#endif struct machine_thread_all_state { |