2009-03-06 Gavin Barraclough <barraclough@apple.com>
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Mar 2009 04:58:36 +0000 (04:58 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Mar 2009 04:58:36 +0000 (04:58 +0000)
        Reviewed by Oliver Hunt.

        When preforming an op_mov, preserve any existing register mapping.

        ~0.5% progression on v8 tests x86-64.

        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41508 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/jit/JIT.cpp

index 4e4cd3503e9f33b1cc984888ac6530f9368a5dd9..6860ab18f8f73c73e17a4072673d0f17dadd18a4 100644 (file)
@@ -1,3 +1,14 @@
+2009-03-06  Gavin Barraclough  <barraclough@apple.com>
+
+        Reviewed by Oliver Hunt.
+
+        When preforming an op_mov, preserve any existing register mapping.
+
+        ~0.5% progression on v8 tests x86-64.
+
+        * jit/JIT.cpp:
+        (JSC::JIT::privateCompileMainPass):
+
 2009-03-05  Simone Fiorentino  <simone.fiorentino@consulenti.fastweb.it>
 
         Bug 24382: request to add SH4 platform
index dbdac25c0c1bf3c59cefb274976f7aebf3dac2e7..5ceeec27237cda3b5d6e5f924997d7f7489d4047 100644 (file)
@@ -311,9 +311,15 @@ void JIT::privateCompileMainPass()
                 storePtr(ImmPtr(JSValuePtr::encode(getConstantOperand(src))), Address(callFrameRegister, dst * sizeof(Register)));
                 if (dst == m_lastResultBytecodeRegister)
                     killLastResultRegister();
-            } else {
+            } else if ((src == m_lastResultBytecodeRegister) || (dst == m_lastResultBytecodeRegister)) {
+                // If either the src or dst is the cached register go though
+                // get/put registers to make sure we track this correctly.
                 emitGetVirtualRegister(src, regT0);
                 emitPutVirtualRegister(dst);
+            } else {
+                // Perform the copy via regT1; do not disturb any mapping in regT0.
+                loadPtr(Address(callFrameRegister, src * sizeof(Register)), regT1);
+                storePtr(regT1, Address(callFrameRegister, dst * sizeof(Register)));
             }
             NEXT_OPCODE(op_mov);
         }