fix(cpu): properly decode THUMB PUSH and POP at comptime
This commit is contained in:
parent
1ac193c506
commit
980e4ff5dd
|
@ -394,8 +394,8 @@ fn thumbPopulate() [0x400]ThumbInstrFn {
|
|||
}
|
||||
|
||||
if (i >> 6 & 0xF == 0b1011 and i >> 3 & 0x3 == 0b10) {
|
||||
const L = i >> 11 & 1 == 1;
|
||||
const R = i >> 8 & 1 == 1;
|
||||
const L = i >> 5 & 1 == 1;
|
||||
const R = i >> 2 & 1 == 1;
|
||||
|
||||
lut[i] = format14(L, R);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ pub fn format14(comptime L: bool, comptime R: bool) InstrFn {
|
|||
}
|
||||
}
|
||||
|
||||
cpu.r[13] = address;
|
||||
cpu.r[13] = address + if (!L) 4 else 0;
|
||||
}
|
||||
}.inner;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue