chore: relocate barrel_shifter zig file
This commit is contained in:
parent
f7518d1bab
commit
2643504eb5
|
@ -1,7 +1,6 @@
|
|||
const std = @import("std");
|
||||
const util = @import("util.zig");
|
||||
|
||||
const BarrelShifter = @import("cpu/arm/barrel_shifter.zig");
|
||||
const Bus = @import("Bus.zig");
|
||||
const Bit = @import("bitfield").Bit;
|
||||
const Bitfield = @import("bitfield").Bitfield;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const std = @import("std");
|
||||
|
||||
const shifter = @import("barrel_shifter.zig");
|
||||
const shifter = @import("../barrel_shifter.zig");
|
||||
const Bus = @import("../../Bus.zig");
|
||||
const Arm7tdmi = @import("../../cpu.zig").Arm7tdmi;
|
||||
const InstrFn = @import("../../cpu.zig").ArmInstrFn;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const std = @import("std");
|
||||
const util = @import("../../util.zig");
|
||||
|
||||
const BarrelShifter = @import("barrel_shifter.zig");
|
||||
const shifter = @import("../barrel_shifter.zig");
|
||||
const Bus = @import("../../Bus.zig");
|
||||
const Arm7tdmi = @import("../../cpu.zig").Arm7tdmi;
|
||||
const InstrFn = @import("../../cpu.zig").ArmInstrFn;
|
||||
|
@ -58,9 +58,9 @@ fn registerOffset(cpu: *Arm7tdmi, opcode: u32) u32 {
|
|||
const rm = cpu.r[opcode & 0xF];
|
||||
|
||||
return switch (@truncate(u2, opcode >> 5)) {
|
||||
0b00 => BarrelShifter.logicalLeft(false, &cpu.cpsr, rm, amount),
|
||||
0b01 => BarrelShifter.logicalRight(false, &cpu.cpsr, rm, amount),
|
||||
0b10 => BarrelShifter.arithmeticRight(false, &cpu.cpsr, rm, amount),
|
||||
0b11 => BarrelShifter.rotateRight(false, &cpu.cpsr, rm, amount),
|
||||
0b00 => shifter.logicalLeft(false, &cpu.cpsr, rm, amount),
|
||||
0b01 => shifter.logicalRight(false, &cpu.cpsr, rm, amount),
|
||||
0b10 => shifter.arithmeticRight(false, &cpu.cpsr, rm, amount),
|
||||
0b11 => shifter.rotateRight(false, &cpu.cpsr, rm, amount),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const std = @import("std");
|
||||
|
||||
const Arm7tdmi = @import("../../cpu.zig").Arm7tdmi;
|
||||
const CPSR = @import("../../cpu.zig").PSR;
|
||||
const Arm7tdmi = @import("../cpu.zig").Arm7tdmi;
|
||||
const CPSR = @import("../cpu.zig").PSR;
|
||||
|
||||
pub fn execute(comptime S: bool, cpu: *Arm7tdmi, opcode: u32) u32 {
|
||||
var result: u32 = undefined;
|
|
@ -3,7 +3,7 @@ const std = @import("std");
|
|||
const Bus = @import("../../Bus.zig");
|
||||
const Arm7tdmi = @import("../../cpu.zig").Arm7tdmi;
|
||||
const InstrFn = @import("../../cpu.zig").ThumbInstrFn;
|
||||
const shifter = @import("../arm/barrel_shifter.zig");
|
||||
const shifter = @import("../barrel_shifter.zig");
|
||||
|
||||
pub fn format1(comptime op: u2, comptime offset: u5) InstrFn {
|
||||
return struct {
|
||||
|
|
Loading…
Reference in New Issue