diff --git a/arch/x86/defs.h b/arch/x86/defs.h index 0bf73ba..9370869 100644 --- a/arch/x86/defs.h +++ b/arch/x86/defs.h @@ -1,7 +1,6 @@ #ifndef __ARCH_X86_DEFS_H #define __ARCH_X86_DEFS_H -#ifndef _GNU_SOURCE #ifndef REG_GS # define REG_GS (0) #endif @@ -53,7 +52,6 @@ #ifndef REG_EIP # define REG_EIP (14) #endif -#endif #define REG_SZ (4) diff --git a/arch/x86_64/defs.h b/arch/x86_64/defs.h index c5fd126..1ebf3a9 100644 --- a/arch/x86_64/defs.h +++ b/arch/x86_64/defs.h @@ -1,29 +1,95 @@ #ifndef __ARCH_X86_64_DEFS_H #define __ARCH_X86_64_DEFS_H -#ifndef _GNU_SOURCE +#ifndef REG_R8 # define REG_R8 (0) +#endif + +#ifndef REG_R9 # define REG_R9 (1) +#endif + +#ifndef REG_R10 # define REG_R10 (2) +#endif + +#ifndef REG_R11 # define REG_R11 (3) +#endif + +#ifndef REG_R12 # define REG_R12 (4) +#endif + +#ifndef REG_R13 # define REG_R13 (5) +#endif + +#ifndef REG_R14 # define REG_R14 (6) +#endif + +#ifndef REG_R15 # define REG_R15 (7) +#endif + +#ifndef REG_RDI # define REG_RDI (8) +#endif + +#ifndef REG_RSI # define REG_RSI (9) +#endif + +#ifndef REG_RBP # define REG_RBP (10) +#endif + +#ifndef REG_RBX # define REG_RBX (11) +#endif + +#ifndef REG_RDX # define REG_RDX (12) +#endif + +#ifndef REG_RAX # define REG_RAX (13) +#endif + +#ifndef REG_RCX # define REG_RCX (14) +#endif + +#ifndef REG_RSP # define REG_RSP (15) +#endif + +#ifndef REG_RIP # define REG_RIP (16) +#endif + +#ifndef REG_EFL # define REG_EFL (17) +#endif + +#ifndef REG_CSGSFS # define REG_CSGSFS (18) +#endif + +#ifndef REG_ERR # define REG_ERR (19) +#endif + +#ifndef REG_TRAPNO # define REG_TRAPNO (20) +#endif + +#ifndef REG_OLDMASK # define REG_OLDMASK (21) +#endif + +#ifndef REG_CR2 # define REG_CR2 (22) #endif