Bug 1247257: SharedStubs: Don't push the return register twice on i686 and x64, r=jandem
authorHannes Verschore <hv1989@gmail.com>
Tue, 16 Feb 2016 10:45:34 -0500
changeset 331303 768ce03913e743a9cc5ef5c816d5b3b1ea5facba
parent 331302 34fa562d20dca4ae870ffb86101d9c0a9649315f
child 331304 c097541033bc152119025dfd52354983824a8c20
push id10956
push userjolesen@mozilla.com
push dateTue, 16 Feb 2016 19:12:12 +0000
reviewersjandem
bugs1247257
milestone47.0a1
Bug 1247257: SharedStubs: Don't push the return register twice on i686 and x64, r=jandem
js/src/jit/x64/SharedICHelpers-x64.h
js/src/jit/x86/SharedICHelpers-x86.h
--- 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: