about summary refs log tree commit diff
path: root/sysdeps/mach/x86
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-09-28 00:07:18 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-09-28 00:10:13 +0200
commit29d4591b07a4da53320e949557c6946c62c26bde (patch)
treeae703bab73f6185724e06996ee0c292dacb66d22 /sysdeps/mach/x86
parent964d15a007d7fb1258f2ad7c8cf4afcfb9a65719 (diff)
downloadglibc-29d4591b07a4da53320e949557c6946c62c26bde.tar.gz
glibc-29d4591b07a4da53320e949557c6946c62c26bde.tar.xz
glibc-29d4591b07a4da53320e949557c6946c62c26bde.zip
hurd: Drop REG_GSFS and REG_ESDS from x86_64's ucontext
These are useless on x86_64, and __NGREG was actually wrong with them.
Diffstat (limited to 'sysdeps/mach/x86')
-rw-r--r--sysdeps/mach/x86/thread_state.h6
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
   {