summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-01-18 09:51:28 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2022-01-18 09:51:28 -0400
commit30d38265c2e868e141ed3b7f747d44ccfa146259 (patch)
tree5c857975f569f2baaf143e3d343d12539df6cf8a
parentb9c44e3629772166ed649a5d1ad1c7832a6f1b5f (diff)
Add bitmasks for operations that mogrify (overwrite)
memory directly.
-rw-r--r--sux.h4
1 files changed, 4 insertions, 0 deletions
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