diff options
Diffstat (limited to 'sux.h')
-rw-r--r-- | sux.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1879,6 +1879,13 @@ static /*inline*/ void inst_##op(struct sux *cpu, uint8_t prefix, uint8_t size, /* 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. */ \ + /* Update status flags. */ \ + t(0, 0x00000000, 0x00000000, 0x00100100, 0x00100100, 0x00000000, 0x00000000, 0x00000000, 0x00000000) { msb = rs*8; } /* inc, dec memory. */ \ + t(0, 0x00000000, 0x00000000, 0x00000000, 0x04000400, 0x04000400, 0x04000400, 0x04000400, 0x04000400) { tmp = *reg2; } /* Register transfers. */ \ + t(0, 0x06220022, 0x00220022, 0x04220422, 0x00441044, 0x10440044, 0x00100110, 0x00320132, 0x00760176) { setflag(carry, C); } /* Update carry flag. */ \ + t(0, 0x07660376, 0x03660376, 0x16361776, 0x06761776, 0x16760576, 0x04760576, 0x04760576, 0x04760576) { setflag(tmp == 0, Z); } /* Update zero flag. */ \ + t(0, 0x06000000, 0x00000000, 0x04000400, 0x00441044, 0x10000000, 0x00100110, 0x00760176, 0x00320132) { setflag(((*reg^tmp2) >> (msb-1)) && ((*reg^tmp) >> (msb-1)), V); } /* Update overflow flag. */ \ + t(0, 0x07660376, 0x03660376, 0x16361776, 0x06761776, 0x16760576, 0x04760576, 0x04760576, 0x04760576) { setflag(tmp >> (msb-1), N); } /* Update negative flag. */ \ } #undef ORTHO_1CC |