diff options
-rw-r--r-- | sux.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -25,7 +25,7 @@ extern uint8_t subdbg; extern uint8_t step; extern uint8_t esc; -static inline uint8_t get_opsize(uint8_t prefix, uint8_t addrmode); +static inline uint8_t get_addrsize(uint8_t prefix, uint8_t addrmode); enum sw_type {RS, AM, BYTE}; @@ -51,7 +51,7 @@ enum sw_type {RS, AM, BYTE}; #define setreg_sw(reg, reg_idx, val, val_idx, prefix, addrmode, type) {\ switch (type) {\ case RS: setreg(reg, +, reg_idx, val, +, val_idx, (1 << (prefix >> 4))-1); break;\ - case AM: setreg(reg, +, reg_idx, val, +, val_idx, get_opsize(prefix, addrmode)); break;\ + case AM: setreg(reg, +, reg_idx, val, +, val_idx, get_addrsize(prefix, addrmode)); break;\ }\ } @@ -67,7 +67,7 @@ extern void disasm(struct sux *cpu, uint64_t *operands, uint8_t lines, uint8_t o extern void io(uint64_t address, uint8_t rw); -static inline uint8_t get_opsize(uint8_t prefix, uint8_t addrmode) { +static inline uint8_t get_addrsize(uint8_t prefix, uint8_t addrmode) { uint8_t id = (prefix & 0x0C) >> 2; switch (addrmode) { case ZM: @@ -132,7 +132,7 @@ static inline uint64_t get_addr(struct sux *cpu, uint64_t *tmpaddr, uint8_t opco tmp = 0; address.u8[0] = addr[cpu->pc]; /* Unroll Loop by implementing Duff's Device. */ - tmp = get_opsize(prefix, ZM)+1; + tmp = get_addrsize(prefix, ZM)+1; setreg_sw(address.u8, 0, addr, cpu->pc, prefix, ZM, AM); cpu->pc+=tmp; #if debug && !bench @@ -179,7 +179,7 @@ static inline uint64_t get_addr(struct sux *cpu, uint64_t *tmpaddr, uint8_t opco } break; case ABS: - tmp = get_opsize(prefix, ABS)+1; + tmp = get_addrsize(prefix, ABS)+1; setreg_sw(address.u8, 0, addr, cpu->pc, prefix, ABS, AM); cpu->pc+=tmp; #if getclk |