Slight simplification to the calling convention: read RegisterFile::end()
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 May 2010 04:30:35 +0000 (04:30 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 May 2010 04:30:35 +0000 (04:30 +0000)
from an absolute address, instead of from a pointer to the RegisterFile
on the stack.

Reviewed by Gavin Barraclough.

SunSpider reports no change.

This should free us to remove the RegisterFile argument from the stack.

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

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

JavaScriptCore/ChangeLog
JavaScriptCore/jit/JIT.cpp

index 7b3df18..108a21b 100644 (file)
@@ -1,3 +1,18 @@
+2010-05-11  Geoffrey Garen  <ggaren@apple.com>
+
+        Reviewed by Gavin Barraclough.
+
+        Slight simplification to the calling convention: read RegisterFile::end()
+        from an absolute address, instead of from a pointer to the RegisterFile
+        on the stack.
+        
+        SunSpider reports no change.
+        
+        This should free us to remove the RegisterFile argument from the stack.
+
+        * jit/JIT.cpp:
+        (JSC::JIT::privateCompile):
+
 2010-05-11  Brian Weinstein  <bweinstein@apple.com>
 
         Possible Gtk build fix - use ALWAYS_INLINE on functions that were inlined.
index c55a54c..2d8e4fa 100644 (file)
@@ -465,31 +465,30 @@ JITCode JIT::privateCompile()
     preserveReturnAddressAfterCall(regT2);
     emitPutToCallFrameHeader(regT2, RegisterFile::ReturnPC);
 
-    Jump slowRegisterFileCheck;
-    Label afterRegisterFileCheck;
+    Jump registerFileCheck;
     if (m_codeBlock->codeType() == FunctionCode) {
         // In the case of a fast linked call, we do not set this up in the caller.
         emitPutImmediateToCallFrameHeader(m_codeBlock, RegisterFile::CodeBlock);
 
-        peek(regT0, OBJECT_OFFSETOF(JITStackFrame, registerFile) / sizeof (void*));
         addPtr(Imm32(m_codeBlock->m_numCalleeRegisters * sizeof(Register)), callFrameRegister, regT1);
-
-        slowRegisterFileCheck = branchPtr(Above, regT1, Address(regT0, OBJECT_OFFSETOF(RegisterFile, m_end)));
-        afterRegisterFileCheck = label();
+        registerFileCheck = branchPtr(Below, AbsoluteAddress(&m_globalData->interpreter->registerFile().
+        m_end), regT1);
     }
 
+    Label functionBody = label();
+
     privateCompileMainPass();
     privateCompileLinkPass();
     privateCompileSlowCases();
 
     if (m_codeBlock->codeType() == FunctionCode) {
-        slowRegisterFileCheck.link(this);
+        registerFileCheck.link(this);
         m_bytecodeIndex = 0;
         JITStubCall(this, cti_register_file_check).call();
 #ifndef NDEBUG
         m_bytecodeIndex = (unsigned)-1; // Reset this, in order to guard its use with ASSERTs.
 #endif
-        jump(afterRegisterFileCheck);
+        jump(functionBody);
     }
 
     ASSERT(m_jmpTable.isEmpty());