do not re-add upper byte for ASL

This commit is contained in:
folkert van heusden 2024-03-29 12:09:12 +01:00
parent bdadc393b2
commit b708b88014
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

View file

@ -1231,10 +1231,7 @@ bool cpu::single_operand_instructions(const uint16_t instr)
case 0b00110011: { // ASL/ASLB
if (dst_mode == 0) {
uint16_t vl = getRegister(dst_reg);
uint16_t add = word_mode == wm_byte ? vl & 0xff00 : 0;
uint16_t v = (vl << 1) & (word_mode == wm_byte ? 0xff : 0xffff);
v |= add;
setPSW_n(SIGN(v, word_mode));
setPSW_z(IS_0(v, wm_word));