From 1ef1029d2247095971488b3862bd2f4270720115 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Mon, 24 Jan 2022 17:31:53 -0400 Subject: sux.h: Add bitmasks for writing registers. --- sux.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sux.h b/sux.h index a0d26a3..0a6b964 100644 --- a/sux.h +++ b/sux.h @@ -1876,6 +1876,9 @@ static /*inline*/ void inst_##op(struct sux *cpu, uint8_t prefix, uint8_t size, t(0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00440044, 0x00000000, 0x00000000) { tmp /= *reg; *reg2 %= tmp2; } /* div. */ \ t(0, 0x00220022, 0x00000000, 0x00220022, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000) { carry = (*reg >> (msb-(tmp2+!tmp2))) & 1; } /* rol, lsl. */ \ t(0, 0x00000000, 0x00220022, 0x00000000, 0x00000000, 0x00440044, 0x00000000, 0x00000000, 0x00440044) { carry = (*reg >> tmp2-(tmp2 != 0)) & 1; } /* ror, lsr, asr. */ \ + /* Store modified value into register. */ \ + t(7, 0x07660376, 0x03660376, 0x16261676, 0x02661276, 0x12760376, 0x00760376, 0x02760376, 0x02760377) { *reg = tmp; } \ + t(0, 0x00000000, 0x00000000, 0x00000000, 0x04000400, 0x04000400, 0x04000400, 0x04000400, 0x04000400) { *reg = *reg2; } /* Register transfers. */ \ } #undef ORTHO_1CC -- cgit v1.2.3-13-gbd6f