From 53c7f6f50ae656161482308d5acf067491cd34b5 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 9 Nov 2021 15:15:18 -0800 Subject: [PATCH] ARM Decoder: Fix decoding of lsl r0 (fixes #2349) --- CHANGES | 1 + src/arm/decoder-arm.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 0692d5e4a..b1a976ebe 100644 --- a/CHANGES +++ b/CHANGES @@ -23,6 +23,7 @@ Emulation fixes: - GBA Video: Don't iterate affine backgrounds when disabled - GBA Video: Delay enabling backgrounds in bitmap modes (fixes mgba.io/i/1668) Other fixes: + - ARM Decoder: Fix decoding of lsl r0 (fixes mgba.io/i/2349) - Core: Don't attempt to restore rewind diffs past start of rewind - FFmpeg: Don't attempt to use YUV 4:2:0 for lossless videos (fixes mgba.io/i/2084) - GB Video: Fix memory leak when reseting SGB games diff --git a/src/arm/decoder-arm.c b/src/arm/decoder-arm.c index 895c82fcd..1a7052c83 100644 --- a/src/arm/decoder-arm.c +++ b/src/arm/decoder-arm.c @@ -24,7 +24,7 @@ #define ADDR_MODE_1_LSL \ ADDR_MODE_1_SHIFT(LSL) \ - if (!info->op3.shifterImm) { \ + if ((info->operandFormat & ARM_OPERAND_SHIFT_IMMEDIATE_3) && !info->op3.shifterImm) { \ info->operandFormat &= ~ARM_OPERAND_SHIFT_IMMEDIATE_3; \ info->op3.shifterOp = ARM_SHIFT_NONE; \ }