Bug 1277408 - Odin: don't forget to AutoForbidPools in the prologue nop either (r=bbouvier)

MozReview-Commit-ID: KHoUFpPT457
This commit is contained in:
Luke Wagner 2016-06-02 14:36:53 -05:00
parent 4e5b62b13a
commit 38784200aa
2 changed files with 4 additions and 8 deletions

View File

@ -382,14 +382,7 @@ wasm::GenerateFunctionEpilogue(MacroAssembler& masm, unsigned framePushed, FuncO
// Generate a nop that is overwritten by a jump to the profiling epilogue
// when profiling is enabled.
{
#if defined(JS_CODEGEN_ARM)
// Forbid pools from being inserted between the profilingJump label and
// the nop since we need the location of the actual nop to patch it.
AutoForbidPools afp(&masm, 1);
#endif
offsets->profilingJump = masm.nopPatchableToNearJump().offset();
}
offsets->profilingJump = masm.nopPatchableToNearJump().offset();
// Normal epilogue:
masm.addToStackPtr(Imm32(framePushed + AsmJSFrameBytesAfterReturnAddress));

View File

@ -4808,6 +4808,9 @@ MacroAssembler::repatchThunk(uint8_t* code, uint32_t u32Offset, uint32_t targetO
CodeOffset
MacroAssembler::nopPatchableToNearJump()
{
// Inhibit pools so that the offset points precisely to the nop.
AutoForbidPools afp(this, 1);
CodeOffset offset(currentOffset());
ma_nop();
return offset;