VERY experimental Nintendo Switch 2 emulator
C++
dyncom: Fix 32-bit ASR shifts for immediates
Lioncashf7770b83d49f
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cppindex c6a9baae3d..b5e0993ed9 100644--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp@@ -176,13 +176,11 @@ unsigned int DPO(ArithmeticShiftRightByImmediate)(arm_processor *cpu, unsigned iunsigned int shifter_operand;int shift_imm = BITS(sht_oper, 7, 11);if (shift_imm == 0) {- if (BIT(rm, 31)) {+ if (BIT(rm, 31) == 0)shifter_operand = 0;- cpu->shifter_carry_out = BIT(rm, 31);- } else {+ elseshifter_operand = 0xFFFFFFFF;- cpu->shifter_carry_out = BIT(rm, 31);- }+ cpu->shifter_carry_out = BIT(rm, 31);} else {shifter_operand = static_cast<int>(rm) >> shift_imm;cpu->shifter_carry_out = BIT(rm, shift_imm - 1);