feat(v5te): stub THUMB BKPT
This commit is contained in:
parent
3c5d4acc5f
commit
502647806c
|
@ -216,3 +216,13 @@ pub fn fmt13(comptime InstrFn: type, comptime S: bool) InstrFn {
|
|||
}
|
||||
}.inner;
|
||||
}
|
||||
|
||||
pub fn bkpt(comptime InstrFn: type) InstrFn {
|
||||
const Arm32 = @typeInfo(@typeInfo(@typeInfo(InstrFn).Pointer.child).Fn.params[0].type.?).Pointer.child;
|
||||
|
||||
return struct {
|
||||
fn inner(cpu: *Arm32, _: u16) void {
|
||||
cpu.panic("TODO: handle THUMB BKPT", .{});
|
||||
}
|
||||
}.inner;
|
||||
}
|
||||
|
|
|
@ -212,14 +212,19 @@ pub const thumb = struct {
|
|||
const rd = i >> 2 & 0x7;
|
||||
break :blk processing.fmt12(InstrFn, isSP, rd);
|
||||
},
|
||||
0b011 => if (i >> 4 & 1 == 1) blk: {
|
||||
0b011 => switch (@as(u2, @truncate(i >> 3 & 0x3))) {
|
||||
0b10 => blk: {
|
||||
// PUSH / POP
|
||||
const L = i >> 5 & 1 == 1;
|
||||
const R = i >> 2 & 1 == 1;
|
||||
break :blk block_transfer.fmt14(InstrFn, L, R);
|
||||
} else blk: {
|
||||
},
|
||||
0b11 => processing.bkpt(InstrFn),
|
||||
else => blk: {
|
||||
const S = i >> 1 & 1 == 1;
|
||||
break :blk processing.fmt13(InstrFn, S);
|
||||
},
|
||||
},
|
||||
0b100 => blk: {
|
||||
const L = i >> 5 & 1 == 1;
|
||||
const rb = i >> 2 & 0x7;
|
||||
|
|
Loading…
Reference in New Issue