feat(cpu): implement thumb push / pop and stub format 13 thumb instrs
This commit is contained in:
17
src/cpu.zig
17
src/cpu.zig
@@ -20,13 +20,15 @@ const softwareInterrupt = @import("cpu/arm/software_interrupt.zig").softwareInte
|
||||
|
||||
// THUMB Instruction Groups
|
||||
const format1 = @import("cpu/thumb/format1.zig").format1;
|
||||
const format2 = @import("cpu/thumb/format2.zig").format2;
|
||||
const format3 = @import("cpu/thumb/format3.zig").format3;
|
||||
const format4 = @import("cpu/thumb/format4.zig").format4;
|
||||
const format2 = @import("cpu/thumb/format2.zig").format2;
|
||||
const format5 = @import("cpu/thumb/format5.zig").format5;
|
||||
const format6 = @import("cpu/thumb/format6.zig").format6;
|
||||
const format9 = @import("cpu/thumb/format9.zig").format9;
|
||||
const format12 = @import("cpu/thumb/format12.zig").format12;
|
||||
const format13 = @import("cpu/thumb/format13.zig").format13;
|
||||
const format14 = @import("cpu/thumb/format14.zig").format14;
|
||||
const format15 = @import("cpu/thumb/format15.zig").format15;
|
||||
const format16 = @import("cpu/thumb/format16.zig").format16;
|
||||
const format19 = @import("cpu/thumb/format19.zig").format19;
|
||||
@@ -385,6 +387,19 @@ fn thumbPopulate() [0x400]ThumbInstrFn {
|
||||
lut[i] = format12(isSP, rd);
|
||||
}
|
||||
|
||||
if (i >> 2 & 0xFF == 0xB0) {
|
||||
const S = i >> 1 & 1 == 1;
|
||||
|
||||
lut[i] = format13(S);
|
||||
}
|
||||
|
||||
if (i >> 6 & 0xF == 0b1011 and i >> 3 & 0x3 == 0b10) {
|
||||
const L = i >> 11 & 1 == 1;
|
||||
const R = i >> 8 & 1 == 1;
|
||||
|
||||
lut[i] = format14(L, R);
|
||||
}
|
||||
|
||||
if (i >> 6 & 0xF == 0b1100) {
|
||||
const L = i >> 5 & 1 == 1;
|
||||
const rb = i >> 2 & 0x3;
|
||||
|
Reference in New Issue
Block a user