chore: drop *Bus argument from the InstrFn LUT

This commit is contained in:
2023-07-25 21:45:02 -05:00
parent f31c4bdb65
commit ba22b856ec
19 changed files with 100 additions and 119 deletions

View File

@@ -1,8 +1,7 @@
const Bus = @import("../lib.zig").Bus;
const Arm946es = @import("../arm.zig").Arm32(.v5te);
pub const arm = struct {
pub const InstrFn = *const fn (*Arm946es, Bus, u32) void;
pub const InstrFn = *const fn (*Arm946es, u32) void;
pub const lut: [0x1000]InstrFn = populate();
const processing = @import("cpu/arm/data_processing.zig").dataProcessing;
@@ -27,7 +26,7 @@ pub const arm = struct {
}
// Undefined ARM Instruction handler
fn und(cpu: *Arm946es, _: Bus, opcode: u32) void {
fn und(cpu: *Arm946es, opcode: u32) void {
const id = idx(opcode);
cpu.panic("[CPU/Decode] ID: 0x{X:0>3} 0x{X:0>8} is an illegal opcode", .{ id, opcode });
}
@@ -127,7 +126,7 @@ pub const arm = struct {
};
pub const thumb = struct {
pub const InstrFn = *const fn (*Arm946es, Bus, u16) void;
pub const InstrFn = *const fn (*Arm946es, u16) void;
pub const lut: [0x400]InstrFn = populate();
const processing = @import("cpu/thumb/data_processing.zig");
@@ -143,7 +142,7 @@ pub const thumb = struct {
}
/// Undefined THUMB Instruction Handler
fn und(cpu: *Arm946es, _: Bus, opcode: u16) void {
fn und(cpu: *Arm946es, opcode: u16) void {
const id = idx(opcode);
cpu.panic("[CPU/Decode] ID: 0b{b:0>10} 0x{X:0>2} is an illegal opcode", .{ id, opcode });
}