ASH clean-up

This commit is contained in:
folkert van heusden 2024-04-22 09:19:29 +02:00
parent cf9a19e49d
commit acb1e28642
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

10
cpu.cpp
View file

@ -830,15 +830,13 @@ bool cpu::additional_double_operand_instructions(const uint16_t instr)
}
else {
int shift_n = 64 - shift;
uint32_t sign_extend = sign ? 0x8000 : 0;
uint64_t value = (0xffffffff00000000ll | R) >> shift_n;
for(int i=0; i<shift_n; i++) {
setPSW_c(R & 1);
R >>= 1;
R |= sign_extend;
}
setPSW_c(R >> (shift_n - 1));
setPSW_v(SIGN(R, wm_word) != SIGN(oldR, wm_word));
R = value;
}
R &= 0xffff;