diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2020-06-13 13:58:18 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2020-06-13 13:58:18 -0400 |
commit | 93d1386f03f36e13187c735a1e4755d646bf91bb (patch) | |
tree | f63558ace239e0bbab495b2810b20fc3ca783e4a | |
parent | 3097e34b570734cb9542c00c4a4395b54eaa0d58 (diff) |
Renamed get_opsize(), to get_addrsize(), in order to
make it clear about what it does.
-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 |