diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2023-02-15 01:16:38 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-02-20 01:33:15 +0100 |
commit | b5b27ff1519d6ca20efcec46bc26964e1c7da68a (patch) | |
tree | 3e932d57f4d922fca561c846ff3a00e739963fdc /sysdeps/mach | |
parent | be318c0f38b6b72a0716edce818b755411e75600 (diff) | |
download | glibc-b5b27ff1519d6ca20efcec46bc26964e1c7da68a.zip glibc-b5b27ff1519d6ca20efcec46bc26964e1c7da68a.tar.gz glibc-b5b27ff1519d6ca20efcec46bc26964e1c7da68a.tar.bz2 |
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: <Y+x4xrsDMkAomncO@jupiter.tail36e24.ts.net>
Diffstat (limited to 'sysdeps/mach')
-rw-r--r-- | sysdeps/mach/x86/thread_state.h (renamed from sysdeps/mach/i386/thread_state.h) | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sysdeps/mach/i386/thread_state.h b/sysdeps/mach/x86/thread_state.h index 4e6ce1f..5be0bec 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 <https://www.gnu.org/licenses/>. */ -#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 <mach/machine/thread_status.h> @@ -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 <sysdeps/mach/thread_state.h> -#endif /* mach/i386/thread_state.h */ +#endif /* mach/x86/thread_state.h */ |