diff options
| author | Andrew Chambers <[email protected]> | 2021-10-19 14:03:50 +1300 |
|---|---|---|
| committer | Andrew Chambers <[email protected]> | 2021-10-19 14:03:50 +1300 |
| commit | 56e797b4845e436a198cc8bbd1bbdf393cd71b13 (patch) | |
| tree | 2a01c237f7030eee43aa98a3be9da2593bc7195f /main.c | |
| parent | 960773e6ad79ccc9fc8dfb1aee835239731a3b2a (diff) | |
Minor refactor and tidy.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -172,11 +172,6 @@ static Relocation *newreloc() { static void sb(uint8_t b) { secaddbyte(cursection, b); } -static void sb2(uint8_t b1, uint8_t b2) { - uint8_t buf[2] = {b1, b2}; - secaddbytes(cursection, buf, sizeof(buf)); -} - static void sbn(uint8_t *bytes, size_t n) { secaddbytes(cursection, bytes, n); } static void su16(uint16_t w) { @@ -211,8 +206,6 @@ static void su64(uint64_t l) { /* Convert an AsmKind to register bits in reg/rm style. */ static uint8_t regbits(AsmKind k) { return (k - (ASM_REG_BEGIN + 1)) % 16; } -static uint8_t isreg64(AsmKind k) { return k >= ASM_RAX && k <= ASM_R15; } - /* Register that requires the use of a rex prefix. */ static uint8_t isrexreg(AsmKind k) { return k > ASM_REG_BEGIN && k < ASM_REG_END && @@ -508,7 +501,7 @@ static void assembleinstr(const Instr *instr) { Rex rex; const Memarg *memarg; const Imm *imm; - uint8_t mod, reg, rm; + uint8_t reg, rm; switch (instr->encoder) { case ENCODER_OP: |
