diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2022-01-21 14:39:45 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2022-01-21 14:39:45 -0400 |
commit | a6d2e3be40108ab9aa6b0a896117902f84bdb926 (patch) | |
tree | c4227e13123580ff3c4adbc72631aa8ef99a52b8 | |
parent | 375c099d1f35f092ca807feffea7dd5c632382f2 (diff) |
sux.h: Add bitmasks for conditional branches.
-rw-r--r-- | sux.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1840,6 +1840,9 @@ static /*inline*/ void inst_##op(struct sux *cpu, uint8_t prefix, uint8_t size, t(7, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00220222, 0x00000000, 0x02000000, 0x02000000) { tmp |= *reg; } /* ora, and set flag. */ \ t(0, 0x00000001, 0x00010001, 0x00010001, 0x00010001, 0x00010000, 0x00220222, 0x00000200, 0x00000200) { tmp &= *reg; } /* AND, and clear/test flag. */ \ t(0, 0x00000000, 0x00000000, 0x00000000, 0x00220022, 0x00000000, 0x00000000, 0x00000000, 0x00000000) { tmp ^= *reg; } /* xor. */ \ + /* Conditional branches. */ \ + t(0, 0x00010000, 0x00010000, 0x00010000, 0x00010001, 0x00000000, 0x00000000, 0x00000000, 0x00000000) { if (tmp) { cpu->pc = addr; } } /* Flag is 1. */ \ + t(0, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00010000, 0x00000000, 0x00000000, 0x00000000) { if (!tmp) { cpu->pc = addr; } } /* Flag is 0. */ \ } #undef ORTHO_1CC |