From eabf7873057a1b167c34391b5d8641904ab907eb Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Fri, 21 Oct 2022 05:12:07 -0300 Subject: [PATCH] fix(cpu): properly decode ldm stm thumb instructions --- src/cpu.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu.zig b/src/cpu.zig index 65058df..519e1bf 100644 --- a/src/cpu.zig +++ b/src/cpu.zig @@ -402,7 +402,7 @@ fn thumbPopulate() [0x400]ThumbInstrFn { if (i >> 6 & 0xF == 0b1100) { const L = i >> 5 & 1 == 1; - const rb = i >> 2 & 0x3; + const rb = i >> 2 & 0x7; lut[i] = format15(L, rb); }