feat(cpu): implement EOR
This commit is contained in:
parent
6189bf0315
commit
85dae5e1d7
|
@ -33,6 +33,17 @@ pub fn dataProcessing(comptime I: bool, comptime S: bool, comptime instrKind: u4
|
||||||
// C set by Barrel Shifter, V is unaffected
|
// C set by Barrel Shifter, V is unaffected
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
0x1 => {
|
||||||
|
// EOR
|
||||||
|
const result = op1 ^ op2;
|
||||||
|
cpu.r[rd] = result;
|
||||||
|
|
||||||
|
if (S and rd != 0xF) {
|
||||||
|
cpu.cpsr.n.write(result >> 31 & 1 == 1);
|
||||||
|
cpu.cpsr.z.write(result == 0);
|
||||||
|
// C set by Barrel Shifter, V is unaffected
|
||||||
|
}
|
||||||
|
},
|
||||||
0x2 => {
|
0x2 => {
|
||||||
// SUB
|
// SUB
|
||||||
const result = op1 -% op2;
|
const result = op1 -% op2;
|
||||||
|
|
Loading…
Reference in New Issue