You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by va...@apache.org on 2007/03/14 13:54:07 UTC

svn commit: r518119 - /harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp

Author: varlax
Date: Wed Mar 14 05:54:05 2007
New Revision: 518119

URL: http://svn.apache.org/viewvc?view=rev&rev=518119
Log:
Applied HARMONY-3389 [drlvm][em64t][jit] JIT does not include 'this' operand into GC enumeration for synchronized methods

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp?view=diff&rev=518119&r1=518118&r2=518119
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp Wed Mar 14 05:54:05 2007
@@ -1502,16 +1502,21 @@
         for (Nodes::const_iterator it = nodes.begin(),end = nodes.end();it!=end; ++it) {
             CGNode* node = (CGNode*)*it;
             if (node == exitNode) {
-#ifndef _EM64T_
                 if (!methodDesc.isStatic() 
                     && (methodDesc.isSynchronized() || methodDesc.isMethodClassIsLikelyExceptionType())) 
                 {
                     BitSet * exitLs  = node->getLiveAtEntry();
                     EntryPointPseudoInst * entryPointInst = getEntryPointInst();
+#ifdef _EM64T_
+                    Opnd * thisOpnd  = entryPointInst->thisOpnd;
+                    //on EM64T 'this' opnd is spilled to stack only after finalizeCallSites call (copy expansion pass)
+                    //TODO: do it after code selector and tune early propagation and regalloc to skip this opnd from optimizations.
+                    if (thisOpnd == NULL) continue; 
+#else
                     Opnd * thisOpnd = entryPointInst->getOpnd(0);
+#endif
                     exitLs->setBit(thisOpnd->getId(), true);
                 } 
-#endif
                 continue;
             }
             bool processNode = true;
@@ -1653,7 +1658,8 @@
 {
 #ifdef _EM64T_
     if (!getMethodDesc().isStatic()) {
-        entryPointInst->thisOpnd = newMemOpnd(getTypeFromTag(Type::UnmanagedPtr), MemOpndKind_StackAutoLayout, getRegOpnd(STACK_REG), 0); 
+        Type* thisType = entryPointInst->getOpnd(0)->getType();
+        entryPointInst->thisOpnd = newMemOpnd(thisType, MemOpndKind_StackAutoLayout, getRegOpnd(STACK_REG), 0); 
         entryPointInst->getBasicBlock()->appendInst(newCopyPseudoInst(Mnemonic_MOV, entryPointInst->thisOpnd, entryPointInst->getOpnd(0)));
     }
 #endif