cpu/arm: fix branch and exchange

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2024-06-11 23:27:07 +05:30
parent f34efb183f
commit 1a2e101ebd
2 changed files with 10 additions and 3 deletions

View File

@@ -168,7 +168,10 @@ Instruction::exec(Cpu& cpu) {
cpu.is_flushed = true;
} break;
case HiRegisterOperations::OpCode::BX: {
State state = static_cast<State>(op_2 & 1);
State state = static_cast<State>(get_bit(op_2, 0));
if (state != cpu.cpsr.state())
glogger.info_bold("State changed");
// set state
cpu.cpsr.set_state(state);