From 30d38265c2e868e141ed3b7f747d44ccfa146259 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Tue, 18 Jan 2022 09:51:28 -0400 Subject: Add bitmasks for operations that mogrify (overwrite) memory directly. --- sux.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sux.h b/sux.h index e99d35a..6dcda89 100644 --- a/sux.h +++ b/sux.h @@ -1817,6 +1817,10 @@ static /*inline*/ void inst_##op(struct sux *cpu, uint8_t prefix, uint8_t size, t(7, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00004200, 0x00000200, 0x02000200, 0x02000201) { reg = &cpu->ps[thread]; } /* php, test/set/clear flags, and interrupts. */ \ t(0, 0x07561370, 0x17561570, 0x14161560, 0x10161160, 0x11161160, 0x51165161, 0x51175161, 0x01171160) { 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; } /* Immediate data. */ \ + /* Operations that mogrify (overwrite) memory directly. */ \ + t(0, 0x00000000, 0x00000200, 0x02000210, 0x02000210, 0x02000000, 0x00000000, 0x00000000, 0x00000000) { tmp = *reg; } /* Mogrifying register. */ \ + t(0, 0x00000000, 0x00000200, 0x00100310, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000) { ++tmp; } /* inc */ \ + t(0, 0x00000000, 0x00000000, 0x02000000, 0x02100110, 0x02000000, 0x00000000, 0x00000000, 0x00000000) { --tmp; } /* dec */ \ } #undef ORTHO_1CC -- cgit v1.2.3-13-gbd6f