ASLB zero-flag fix

This commit is contained in:
folkert van heusden 2024-04-04 22:34:45 +02:00
parent 96d4946194
commit 5185df56eb
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

View file

@ -1230,7 +1230,7 @@ bool cpu::single_operand_instructions(const uint16_t instr)
v |= vl & 0xff00;
setPSW_n(SIGN(v, word_mode));
setPSW_z(IS_0(v, wm_word));
setPSW_z(IS_0(v, word_mode));
setPSW_c(SIGN(vl, word_mode));
setPSW_v(getPSW_n() ^ getPSW_c());
@ -1245,7 +1245,7 @@ bool cpu::single_operand_instructions(const uint16_t instr)
if (set_flags) {
setPSW_n(SIGN(v, word_mode));
setPSW_z(IS_0(v, wm_word));
setPSW_z(IS_0(v, word_mode));
setPSW_c(SIGN(vl, word_mode));
setPSW_v(getPSW_n() ^ getPSW_c());
}