fix(arm): group multiply instructions together
- implement clz in ARMv5TE
This commit is contained in:
@@ -14,11 +14,10 @@ pub const arm = struct {
|
||||
const swi = @import("cpu/arm/software_interrupt.zig").armSoftwareInterrupt;
|
||||
const swap = @import("cpu/arm/single_data_swap.zig").singleDataSwap;
|
||||
|
||||
// Arithmetic Instruction Extension Space
|
||||
const multiply = @import("cpu/arm/multiply.zig").multiply;
|
||||
const multiplyLong = @import("cpu/arm/multiply.zig").multiplyLong;
|
||||
|
||||
const cop = @import("cpu/arm/coprocessor.zig");
|
||||
|
||||
const clz = @import("cpu/arm/misc_instructions.zig").clz;
|
||||
|
||||
/// Determine index into ARM InstrFn LUT
|
||||
@@ -44,18 +43,15 @@ pub const arm = struct {
|
||||
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;
|
||||
break :blk multiply(InstrFn, A, S);
|
||||
} else if (i & 0xFBF == 0x109) blk: {
|
||||
const B = i >> 6 & 1 == 1;
|
||||
break :blk swap(InstrFn, B);
|
||||
} else if (i & 0xF8F == 0x089) blk: {
|
||||
} else if (i & 0xF0F == 0x009) blk: {
|
||||
const L = i >> 7 & 1 == 1;
|
||||
const U = i >> 6 & 1 == 1;
|
||||
const A = i >> 5 & 1 == 1;
|
||||
const S = i >> 4 & 1 == 1;
|
||||
break :blk multiplyLong(InstrFn, U, A, S);
|
||||
break :blk multiply(InstrFn, L, U, A, S);
|
||||
} else if (i & 0xE49 == 0x009 or i & 0xE49 == 0x049) blk: {
|
||||
const P = i >> 8 & 1 == 1;
|
||||
const U = i >> 7 & 1 == 1;
|
||||
|
Reference in New Issue
Block a user