summaryrefslogtreecommitdiff
path: root/sux.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-02-13 20:16:43 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2022-02-13 20:16:43 -0400
commit6833f6bc2a5730169084c74d8e8fc0b76666b2a0 (patch)
treec1ab9446aad18af56ecf55c1187ce5c8d95c8183 /sux.h
parent8d9190cb14f287193196f422d49dbca0809980c7 (diff)
sux.h: Add bitmask for b register addressing mode.
Diffstat (limited to 'sux.h')
-rw-r--r--sux.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sux.h b/sux.h
index 4088629..b14d57d 100644
--- a/sux.h
+++ b/sux.h
@@ -1836,6 +1836,7 @@ static /*inline*/ void inst_##op(struct sux *cpu, uint8_t prefix, uint8_t size,
t(5, 0x00010001, 0x00010001, 0x00010001, 0x00010001, 0x40014200, 0x00000200, 0x02000200, 0x02000201) { reg = (uint64_t *)&cpu->ps.u8[thread]; } /* php, test/set/clear flags, and interrupts. */ \
t(7, 0x07470371, 0x03470171, 0x14171561, 0x00171161, 0x10170360, 0x00160160, 0x00160160, 0x00160160) { tmp = read_value(cpu, 0, addr, rs, inc_clk, 1); } /* Read data from memory. */ \
t(0, 0x00000006, 0x00000006, 0x00000006, 0x00000006, 0x00000016, 0x00000016, 0x00000016, 0x00000016) { tmp = read_value(cpu, 0, cpu->pc, rs, inc_clk, 0); cpu->pc += rs+1; } /* Immediate data. */ \
+ t(0, 0x00200000, 0x00200000, 0x00200000, 0x00600000, 0x00600000, 0x00600000, 0x00600000, 0x00600000) { tmp = cpu->b; } /* Use B register as operand. */ \
t(7, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0x00000000) { addr = tmp; } /* Interrupts. */ \
/* Setup register transfers. */ \
t(0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0x00000400, 0x00000400) { reg2 = &cpu->a; } /* tab, tax, tay. */ \