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;
|
}.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,13 +212,18 @@ pub const thumb = struct {
|
||||||
const rd = i >> 2 & 0x7;
|
const rd = i >> 2 & 0x7;
|
||||||
break :blk processing.fmt12(InstrFn, isSP, rd);
|
break :blk processing.fmt12(InstrFn, isSP, rd);
|
||||||
},
|
},
|
||||||
0b011 => if (i >> 4 & 1 == 1) blk: {
|
0b011 => switch (@as(u2, @truncate(i >> 3 & 0x3))) {
|
||||||
const L = i >> 5 & 1 == 1;
|
0b10 => blk: {
|
||||||
const R = i >> 2 & 1 == 1;
|
// PUSH / POP
|
||||||
break :blk block_transfer.fmt14(InstrFn, L, R);
|
const L = i >> 5 & 1 == 1;
|
||||||
} else blk: {
|
const R = i >> 2 & 1 == 1;
|
||||||
const S = i >> 1 & 1 == 1;
|
break :blk block_transfer.fmt14(InstrFn, L, R);
|
||||||
break :blk processing.fmt13(InstrFn, S);
|
},
|
||||||
|
0b11 => processing.bkpt(InstrFn),
|
||||||
|
else => blk: {
|
||||||
|
const S = i >> 1 & 1 == 1;
|
||||||
|
break :blk processing.fmt13(InstrFn, S);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
0b100 => blk: {
|
0b100 => blk: {
|
||||||
const L = i >> 5 & 1 == 1;
|
const L = i >> 5 & 1 == 1;
|
||||||
|
|
Loading…
Reference in New Issue