feat: aarch64 linux support
This commit is contained in:
parent
de78d6ca0a
commit
fe84c58450
8 changed files with 53 additions and 18 deletions
|
@ -15,11 +15,19 @@ struct Context {
|
|||
uint8_t redzone[128];
|
||||
};
|
||||
|
||||
#ifdef __x86_64__
|
||||
#define GPR1 uc.uc_mcontext.gregs[REG_RDI]
|
||||
#define GPR2 uc.uc_mcontext.gregs[REG_RSI]
|
||||
#define GPR3 uc.uc_mcontext.gregs[REG_RDX]
|
||||
#define GPR4 uc.uc_mcontext.gregs[REG_RCX]
|
||||
#define GPRx uc.uc_mcontext.gregs[REG_RAX]
|
||||
#elif __aarch64__
|
||||
#define GPR1 uc.uc_mcontext.regs[0]
|
||||
#define GPR2 uc.uc_mcontext.regs[1]
|
||||
#define GPR3 uc.uc_mcontext.regs[2]
|
||||
#define GPR4 uc.uc_mcontext.regs[3]
|
||||
#define GPRx uc.uc_mcontext.regs[0]
|
||||
#endif
|
||||
|
||||
#undef __USE_GNU
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue