fix: remove undefined
This commit is contained in:
parent
e694110fbd
commit
69cf5b12f1
|
@ -17,13 +17,8 @@ pub fn dataProcessing(comptime I: bool, comptime S: bool, comptime instrKind: u4
|
||||||
if (!I and opcode >> 4 & 1 == 1) cpu.r[15] += 4;
|
if (!I and opcode >> 4 & 1 == 1) cpu.r[15] += 4;
|
||||||
const op1 = cpu.r[rn];
|
const op1 = cpu.r[rn];
|
||||||
|
|
||||||
var op2: u32 = undefined;
|
|
||||||
if (I) {
|
|
||||||
const amount = @truncate(u8, (opcode >> 8 & 0xF) << 1);
|
const amount = @truncate(u8, (opcode >> 8 & 0xF) << 1);
|
||||||
op2 = rotateRight(S, &cpu.cpsr, opcode & 0xFF, amount);
|
const op2 = if (I) rotateRight(S, &cpu.cpsr, opcode & 0xFF, amount) else execute(S, cpu, opcode);
|
||||||
} else {
|
|
||||||
op2 = execute(S, cpu, opcode);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Undo special condition from above
|
// Undo special condition from above
|
||||||
if (!I and opcode >> 4 & 1 == 1) cpu.r[15] -= 4;
|
if (!I and opcode >> 4 & 1 == 1) cpu.r[15] -= 4;
|
||||||
|
|
Loading…
Reference in New Issue