fix: remove undefined

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-07-03 08:59:44 -03:00
parent 7872515da7
commit 0e53e774fe
1 changed files with 2 additions and 7 deletions

View File

@ -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; const amount = @truncate(u8, (opcode >> 8 & 0xF) << 1);
if (I) { const op2 = if (I) rotateRight(S, &cpu.cpsr, opcode & 0xFF, amount) else execute(S, cpu, opcode);
const amount = @truncate(u8, (opcode >> 8 & 0xF) << 1);
op2 = rotateRight(S, &cpu.cpsr, opcode & 0xFF, amount);
} 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;