Bug 1247257: SharedStubs: Don't push the return register twice on i686 and x64, r=jandem
--- a/js/src/jit/x64/SharedICHelpers-x64.h
+++ b/js/src/jit/x64/SharedICHelpers-x64.h
@@ -186,17 +186,16 @@ EmitBaselineEnterStubFrame(MacroAssemble
masm.Push(BaselineFrameReg);
masm.mov(BaselineStackReg, BaselineFrameReg);
}
inline void
EmitIonEnterStubFrame(MacroAssembler& masm, Register)
{
masm.loadPtr(Address(masm.getStackPointer(), 0), ICTailCallReg);
- masm.Push(ICTailCallReg);
masm.Push(ICStubReg);
}
inline void
EmitBaselineLeaveStubFrame(MacroAssembler& masm, bool calledIntoIon = false)
{
// Ion frames do not save and restore the frame pointer. If we called
// into Ion, we have to restore the stack pointer from the frame descriptor.
@@ -221,17 +220,16 @@ EmitBaselineLeaveStubFrame(MacroAssemble
// the state before entering the stub frame.
masm.storePtr(ICTailCallReg, Address(BaselineStackReg, 0));
}
inline void
EmitIonLeaveStubFrame(MacroAssembler& masm)
{
masm.Pop(ICStubReg);
- masm.Pop(ICTailCallReg);
}
inline void
EmitStowICValues(MacroAssembler& masm, int values)
{
MOZ_ASSERT(values >= 0 && values <= 2);
switch(values) {
case 1:
--- a/js/src/jit/x86/SharedICHelpers-x86.h
+++ b/js/src/jit/x86/SharedICHelpers-x86.h
@@ -186,17 +186,16 @@ EmitBaselineEnterStubFrame(MacroAssemble
}
inline void
EmitIonEnterStubFrame(MacroAssembler& masm, Register scratch)
{
MOZ_ASSERT(scratch != ICTailCallReg);
masm.loadPtr(Address(masm.getStackPointer(), 0), ICTailCallReg);
- masm.Push(ICTailCallReg);
masm.Push(ICStubReg);
}
inline void
EmitBaselineLeaveStubFrame(MacroAssembler& masm, bool calledIntoIon = false)
{
// Ion frames do not save and restore the frame pointer. If we called
// into Ion, we have to restore the stack pointer from the frame descriptor.
@@ -221,17 +220,16 @@ EmitBaselineLeaveStubFrame(MacroAssemble
// the state before entering the stub frame.
masm.storePtr(ICTailCallReg, Address(BaselineStackReg, 0));
}
inline void
EmitIonLeaveStubFrame(MacroAssembler& masm)
{
masm.Pop(ICStubReg);
- masm.Pop(ICTailCallReg);
}
inline void
EmitStowICValues(MacroAssembler& masm, int values)
{
MOZ_ASSERT(values >= 0 && values <= 2);
switch(values) {
case 1: