translate_arm/branch: Read-after-write in arm_BLX_reg
When BLX LR is translated, BXWritePC(GetRegister(Reg::LR)) was executed after the SetRegister(Reg::LR, _) update was done.
This commit is contained in:
parent
d8bee60947
commit
843d29b5a9
1 changed files with 1 additions and 1 deletions
|
@ -51,8 +51,8 @@ bool ArmTranslatorVisitor::arm_BLX_reg(Cond cond, Reg m) {
|
||||||
// BLX <Rm>
|
// BLX <Rm>
|
||||||
if (ConditionPassed(cond)) {
|
if (ConditionPassed(cond)) {
|
||||||
ir.PushRSB(ir.current_location.AdvancePC(4));
|
ir.PushRSB(ir.current_location.AdvancePC(4));
|
||||||
ir.SetRegister(Reg::LR, ir.Imm32(ir.current_location.PC() + 4));
|
|
||||||
ir.BXWritePC(ir.GetRegister(m));
|
ir.BXWritePC(ir.GetRegister(m));
|
||||||
|
ir.SetRegister(Reg::LR, ir.Imm32(ir.current_location.PC() + 4));
|
||||||
ir.SetTerm(IR::Term::ReturnToDispatch{});
|
ir.SetTerm(IR::Term::ReturnToDispatch{});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue