bug 1010269: When generating offsets for toggling branches, use the correct one (r=dougc)

This commit is contained in:
Marty Rosenberg 2014-05-23 04:09:47 -04:00
parent 5441acb4eb
commit 88ed6fc4a4
2 changed files with 6 additions and 5 deletions

View File

@ -1299,10 +1299,10 @@ MacroAssemblerARM::ma_vpush(VFPRegister r)
}
// Branches when done from within arm-specific code.
void
BufferOffset
MacroAssemblerARM::ma_b(Label *dest, Assembler::Condition c, bool isPatchable)
{
as_b(dest, c, isPatchable);
return as_b(dest, c, isPatchable);
}
void
@ -4293,8 +4293,9 @@ CodeOffsetLabel
MacroAssemblerARMCompat::toggledJump(Label *label)
{
// Emit a B that can be toggled to a CMP. See ToggleToJmp(), ToggleToCmp().
CodeOffsetLabel ret(nextOffset().getOffset());
ma_b(label, Always, true);
BufferOffset b = ma_b(label, Always, true);
CodeOffsetLabel ret(b.getOffset());
return ret;
}

View File

@ -312,7 +312,7 @@ class MacroAssemblerARM : public Assembler
void ma_vpush(VFPRegister r);
// branches when done from within arm-specific code
void ma_b(Label *dest, Condition c = Always, bool isPatchable = false);
BufferOffset ma_b(Label *dest, Condition c = Always, bool isPatchable = false);
void ma_bx(Register dest, Condition c = Always);
void ma_b(void *target, Relocation::Kind reloc, Condition c = Always);