From 046dc7d5791b42aa4bd84988dccd357a83a4f0c4 Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Mon, 22 Apr 2024 15:45:07 +0200 Subject: [PATCH] ASH --- cpu.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cpu.cpp b/cpu.cpp index 5c632d2..1a1da2c 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -831,6 +831,15 @@ bool cpu::additional_double_operand_instructions(const uint16_t instr) setPSW_v(SIGN(R, wm_word) != SIGN(oldR, wm_word)); } else { + int shift_n = 64 - shift; + uint32_t sign_extend = sign ? 0x8000 : 0; + + for(int i=0; i>= 1; + R |= sign_extend; + } +/* int shift_n = 64 - shift; uint16_t new_value = (sign ? uint64_t(0xffffffff0000) : 0) | R; @@ -839,7 +848,7 @@ bool cpu::additional_double_operand_instructions(const uint16_t instr) new_value >>= 1; R = new_value; - +*/ setPSW_v(SIGN(R, wm_word) != SIGN(oldR, wm_word)); }