[masm] Remove unused code
authorSimon Hausmann <simon.hausmann@digia.com>
Wed, 13 Feb 2013 09:35:46 +0000 (10:35 +0100)
committerLars Knoll <lars.knoll@digia.com>
Wed, 13 Feb 2013 10:19:09 +0000 (11:19 +0100)
We don't need to save & restore esi on ia32 between calls, because it's
actually a callee saved register.

Change-Id: I452bc59c42b5428a4f5f32e379be144c744cfd2a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/v4/qv4isel_masm_p.h

index 9e2c4e6..953ff7a 100644 (file)
@@ -408,20 +408,6 @@ public:
     void enterStandardStackFrame(int locals);
     void leaveStandardStackFrame(int locals);
 
-    void callFunctionPrologue()
-    {
-#if CPU(X86)
-        // Callee might clobber it :(
-        push(ContextRegister);
-#endif
-    }
-    void callFunctionEpilogue()
-    {
-#if CPU(X86)
-        pop(ContextRegister);
-#endif
-    }
-
     static inline int sizeOfArgument(VoidType)
     { return 0; }
     static inline int sizeOfArgument(RegisterID)
@@ -476,8 +462,6 @@ public:
     template <typename ArgRet, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
     void generateFunctionCallImp(ArgRet r, const char* functionName, FunctionPtr function, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5)
     {
-        callFunctionPrologue();
-
         int totalNumberOfArgs = 5;
 
         // If necessary reserve space for the return value on the stack and
@@ -514,8 +498,6 @@ public:
 
         if (stackSizeToCorrect)
             add32(TrustedImm32(stackSizeToCorrect), StackPointerRegister);
-
-        callFunctionEpilogue();
     }
 
     template <typename ArgRet, typename Arg1, typename Arg2, typename Arg3, typename Arg4>