mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
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>
This commit is contained in:
parent
be318c0f38
commit
b5b27ff151
1 changed files with 9 additions and 3 deletions
|
@ -16,8 +16,8 @@
|
||||||
License along with the GNU C Library; if not, see
|
License along with the GNU C Library; if not, see
|
||||||
<https://www.gnu.org/licenses/>. */
|
<https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#ifndef _MACH_I386_THREAD_STATE_H
|
#ifndef _MACH_X86_THREAD_STATE_H
|
||||||
#define _MACH_I386_THREAD_STATE_H 1
|
#define _MACH_X86_THREAD_STATE_H 1
|
||||||
|
|
||||||
#include <mach/machine/thread_status.h>
|
#include <mach/machine/thread_status.h>
|
||||||
|
|
||||||
|
@ -29,9 +29,15 @@
|
||||||
|
|
||||||
#define machine_thread_state i386_thread_state
|
#define machine_thread_state i386_thread_state
|
||||||
|
|
||||||
|
#ifdef __x86_64__
|
||||||
|
#define PC rip
|
||||||
|
#define SP ursp
|
||||||
|
#define SYSRETURN rax
|
||||||
|
#else
|
||||||
#define PC eip
|
#define PC eip
|
||||||
#define SP uesp
|
#define SP uesp
|
||||||
#define SYSRETURN eax
|
#define SYSRETURN eax
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MACHINE_THREAD_STATE_FIX_NEW(ts) do { \
|
#define MACHINE_THREAD_STATE_FIX_NEW(ts) do { \
|
||||||
asm ("mov %%cs, %w0" : "=q" ((ts)->cs)); \
|
asm ("mov %%cs, %w0" : "=q" ((ts)->cs)); \
|
||||||
|
@ -50,4 +56,4 @@ struct machine_thread_all_state
|
||||||
|
|
||||||
#include <sysdeps/mach/thread_state.h>
|
#include <sysdeps/mach/thread_state.h>
|
||||||
|
|
||||||
#endif /* mach/i386/thread_state.h */
|
#endif /* mach/x86/thread_state.h */
|
Loading…
Add table
Reference in a new issue