diff --git a/src/arm/v5te.zig b/src/arm/v5te.zig index a20f52e..6350c80 100644 --- a/src/arm/v5te.zig +++ b/src/arm/v5te.zig @@ -19,6 +19,8 @@ pub const arm = struct { const cop = @import("cpu/arm/coprocessor.zig"); + const clz = @import("cpu/arm/misc_instructions.zig").clz; + /// Determine index into ARM InstrFn LUT pub fn idx(opcode: u32) u12 { // FIXME: omit these? @@ -40,6 +42,8 @@ pub const arm = struct { handler.* = switch (@as(u2, i >> 10)) { 0b00 => if (i == 0x121) blk: { break :blk branchExchange(InstrFn); + } else if (i == 0x161) blk: { + break :blk clz(InstrFn); } else if (i & 0xFCF == 0x009) blk: { const A = i >> 5 & 1 == 1; const S = i >> 4 & 1 == 1;