From 6833f6bc2a5730169084c74d8e8fc0b76666b2a0 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Sun, 13 Feb 2022 20:16:43 -0400 Subject: sux.h: Add bitmask for b register addressing mode. --- sux.h | 1 + 1 file changed, 1 insertion(+) 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. */ \ -- cgit v1.2.3-13-gbd6f