Bug 1103108 part 3 - ARM: Replace single use ma_callJitNoPush by its implementation. r=h4writer

This commit is contained in:
Nicolas B. Pierron 2015-08-25 17:50:54 +02:00
parent a9f05902cd
commit 5c6fb611bc
3 changed files with 9 additions and 17 deletions

View File

@ -3653,17 +3653,6 @@ MacroAssemblerARMCompat::storeTypeTag(ImmTag tag, const BaseIndex& dest)
// function, and *sp is data that is owned by the caller, not the callee. The
// ION ABI says *sp should be the address that we will return to when leaving
// this function.
void
MacroAssemblerARM::ma_callJitNoPush(const Register r)
{
// Since we just write the return address into the stack, which is popped on
// return, the net effect is removing 4 bytes from the stack.
// Bug 1103108: remove this function, and refactor all uses.
as_add(sp, sp, Imm8(4));
as_blx(r);
}
void
MacroAssemblerARM::ma_callJitHalfPush(const Register r)
{

View File

@ -424,8 +424,6 @@ class MacroAssemblerARM : public Assembler
BufferOffset ma_vstr(VFPRegister src, Register base, Register index, int32_t shift,
int32_t offset, Condition cc = Always);
// Calls an Ion function, assuming that sp has already been decremented.
void ma_callJitNoPush(const Register reg);
// Calls an ion function, assuming that the stack is currently not 8 byte
// aligned.
void ma_callJitHalfPush(const Register reg);

View File

@ -338,12 +338,17 @@ JitRuntime::generateEnterJIT(JSContext* cx, EnterJitType type)
masm.loadPtr(Address(r11, offsetof(EnterJITStack, scopeChain)), R1.scratchReg());
}
// The space for the return address is already reserved. Check that it is
// correctly aligned for a Jit frame.
masm.assertStackAlignment(JitStackAlignment);
// The Data transfer is pushing 4 words, which already account for the
// return address space of the Jit frame. We have to undo what the data
// transfer did before making the call.
masm.addPtr(Imm32(sizeof(uintptr_t)), sp);
// The callee will push the return address on the stack, thus we check that
// the stack would be aligned once the call is complete.
masm.assertStackAlignment(JitStackAlignment, sizeof(uintptr_t));
// Call the function.
masm.ma_callJitNoPush(r0);
masm.ma_callJitHalfPush(r0);
if (type == EnterJitBaseline) {
// Baseline OSR will return here.