Fix not flushing the pipeline for "mov pc, reg" instructions
Former-commit-id: 66136ef70b8f48d5e9f4c10b65f1e2fbd3dd3ea1
This commit is contained in:
parent
863838a4a4
commit
163d8bda59
|
@ -137,6 +137,9 @@ impl Core {
|
|||
let result = self.alu(arm_alu_op, op1, op2, true);
|
||||
if let Some(result) = result {
|
||||
self.set_reg(dst_reg, result as u32);
|
||||
if dst_reg == REG_PC {
|
||||
return Ok(CpuPipelineAction::Flush);
|
||||
}
|
||||
}
|
||||
Ok(CpuPipelineAction::IncPC)
|
||||
}
|
||||
|
|
Reference in a new issue