feat: working pipeline implementation

This commit is contained in:
2022-09-28 16:11:25 -03:00
parent 5bb5bdf389
commit 870e991862
10 changed files with 31 additions and 45 deletions

View File

@@ -12,7 +12,7 @@ pub fn branch(comptime L: bool) InstrFn {
if (L) cpu.r[14] = cpu.r[15] - 4;
cpu.r[15] +%= sext(u32, u24, opcode) << 2;
cpu.pipe.reload(u32, cpu);
cpu.pipe.reload(cpu);
}
}.inner;
}
@@ -24,5 +24,5 @@ pub fn branchAndExchange(cpu: *Arm7tdmi, _: *Bus, opcode: u32) void {
cpu.r[15] = cpu.r[rn] & if (thumb) ~@as(u32, 1) else ~@as(u32, 3);
cpu.cpsr.t.write(thumb);
if (thumb) cpu.pipe.reload(u16, cpu) else cpu.pipe.reload(u32, cpu);
cpu.pipe.reload(cpu);
}