From: Flavio Cruz Date: Wed, 15 Feb 2023 06:16:38 +0000 (-0500) Subject: Define PC, SP and SYSRETURN for hurd x86_64 X-Git-Tag: glibc-2.38~555 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=b5b27ff1519d6ca20efcec46bc26964e1c7da68a;p=glibc.git Define PC, SP and SYSRETURN for hurd x86_64 Moved thread_state.h to x86 directory since we only need to customize those 3 definitions. Message-Id: --- diff --git a/sysdeps/mach/i386/thread_state.h b/sysdeps/mach/x86/thread_state.h similarity index 90% rename from sysdeps/mach/i386/thread_state.h rename to sysdeps/mach/x86/thread_state.h index 4e6ce1f7dd..5be0bec150 100644 --- a/sysdeps/mach/i386/thread_state.h +++ b/sysdeps/mach/x86/thread_state.h @@ -16,8 +16,8 @@ License along with the GNU C Library; if not, see . */ -#ifndef _MACH_I386_THREAD_STATE_H -#define _MACH_I386_THREAD_STATE_H 1 +#ifndef _MACH_X86_THREAD_STATE_H +#define _MACH_X86_THREAD_STATE_H 1 #include @@ -29,9 +29,15 @@ #define machine_thread_state i386_thread_state +#ifdef __x86_64__ +#define PC rip +#define SP ursp +#define SYSRETURN rax +#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)); \ @@ -50,4 +56,4 @@ struct machine_thread_all_state #include -#endif /* mach/i386/thread_state.h */ +#endif /* mach/x86/thread_state.h */