From acb1e286425bb07f43bc236980411ca98a544125 Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Mon, 22 Apr 2024 09:19:29 +0200 Subject: [PATCH] ASH clean-up --- cpu.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cpu.cpp b/cpu.cpp index e7800f3..207e6b7 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -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>= 1; - R |= sign_extend; - } + setPSW_c(R >> (shift_n - 1)); setPSW_v(SIGN(R, wm_word) != SIGN(oldR, wm_word)); + + R = value; } R &= 0xffff;