Compare commits

..

No commits in common. "ed3bdd90fb3bff176b77d6f6e3e4826d5296aa4c" and "0f08ad05beed48a598818b49089aa324c0b12b05" have entirely different histories.

1 changed files with 0 additions and 19 deletions

View File

@ -45,15 +45,6 @@ pub fn dataProcessing(comptime I: bool, comptime S: bool, comptime instrKind: u4
// Barrel Shifter should always calc CPSR C in TST
if (!S) _ = BarrelShifter.exec(true, cpu, opcode);
},
0x9 => {
// TEQ
const result = cpu.r[op1] ^ op2;
cpu.cpsr.n.write(result >> 31 & 1 == 1);
cpu.cpsr.z.write(result == 0);
// Barrel Shifter should always calc CPSR C in TEQ
if (!S) _ = BarrelShifter.exec(true, cpu, opcode);
},
0xD => {
// MOV
cpu.r[rd] = op2;
@ -73,16 +64,6 @@ pub fn dataProcessing(comptime I: bool, comptime S: bool, comptime instrKind: u4
cpu.cpsr.c.write(op2 <= cpu.r[op1]);
cpu.cpsr.v.write(((op1 ^ result) & (~op2 ^ result)) >> 31 & 1 == 1);
},
0xC => {
// ORR
const result = cpu.r[op1] | op2;
if (S and rd != 0xF) {
cpu.cpsr.n.write(result >> 31 & 1 == 1);
cpu.cpsr.z.write(result == 0);
// C set by Barr0x15el Shifter, V is unnafected
}
},
else => std.debug.panic("[CPU] TODO: implement data processing type {}", .{instrKind}),
}
}