From 3e786d02ac6c9f4ad85640bae789b6429a3e5e0b Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Fri, 21 Oct 2022 05:12:12 -0300 Subject: [PATCH] fix(cpu): properly decode format 7 and 8 --- src/cpu.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu.zig b/src/cpu.zig index dc23bb9..297cc33 100644 --- a/src/cpu.zig +++ b/src/cpu.zig @@ -453,7 +453,7 @@ fn thumbPopulate() [0x400]ThumbInstrFn { lut[i] = format6(rd); } else if (i >> 6 & 0xF == 0b0101) { - const op = i >> 5 & 0x3; + const op = i >> 4 & 0x3; const T = i >> 3 & 1 == 1; lut[i] = format78(op, T);