diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-09-17 01:28:55 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | b095aedd386e076d1f5a56b7384b836e653387d1 (patch) | |
tree | a9dd7d7cbcfba19005ce8aa9486a70d31091d5c3 /executor/x86_64/asm.h | |
parent | 2928e5f74983f5dd33bc65f192298af87996a037 (diff) |
Add support for r8-r15 registers, pass args to registers directly (sys-v)
Diffstat (limited to 'executor/x86_64/asm.h')
-rw-r--r-- | executor/x86_64/asm.h | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/executor/x86_64/asm.h b/executor/x86_64/asm.h index 6ac74f4..b82a63e 100644 --- a/executor/x86_64/asm.h +++ b/executor/x86_64/asm.h @@ -21,15 +21,27 @@ typedef enum { EDI } Reg32; +#define REG64_EXTENDED_REG_BIT (1 << 3) +#define REG64_REG_BITS 0x7 + typedef enum { - RAX, - RCX, - RDX, - RBX, - RSP, - RBP, - RSI, - RDI + RAX = 0, + RCX = 1, + RDX = 2, + RBX = 3, + RSP = 4, + RBP = 5, + RSI = 6, + RDI = 7, + + R8 = REG64_EXTENDED_REG_BIT | RAX, + R9 = REG64_EXTENDED_REG_BIT | RCX, + R10 = REG64_EXTENDED_REG_BIT | RDX, + R11 = REG64_EXTENDED_REG_BIT | RBX, + R12 = REG64_EXTENDED_REG_BIT | RSP, + R13 = REG64_EXTENDED_REG_BIT | RBP, + R14 = REG64_EXTENDED_REG_BIT | RSI, + R15 = REG64_EXTENDED_REG_BIT | RDI } Reg64; typedef struct { |