harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfur...@apache.org
Subject svn commit: r649794 - /harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32APIMagics.cpp
Date Sat, 19 Apr 2008 10:26:39 GMT
Author: mfursov
Date: Sat Apr 19 03:26:38 2008
New Revision: 649794

URL: http://svn.apache.org/viewvc?rev=649794&view=rev
Log:
Fix for HARMONY-4744 [drlvm][jit][opt] Fix for a regression introduced by HLOMagics refactoring


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

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32APIMagics.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32APIMagics.cpp?rev=649794&r1=649793&r2=649794&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32APIMagics.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32APIMagics.cpp Sat Apr
19 03:26:38 2008
@@ -460,7 +460,15 @@
 void System_arraycopyDirect_Handler::run()
 {
     Node* currNode = callInst->getNode();
+    if (callInst!=currNode->getLastInst()) {
+        cfg->splitNodeAtInstruction(callInst, true, true, NULL);
+    }
+    UNUSED Node* nextNode = currNode->getUnconditionalEdgeTarget();
+    assert(nextNode!=NULL);
     assert( currNode->getOutEdge(Edge::Kind_Dispatch) == NULL);
+
+    callInst->unlink();
+
 #ifdef _EM64T_
     RegName counterRegName = RegName_RCX;
     RegName srcAddrRegName = RegName_RSI;
@@ -514,15 +522,13 @@
     Inst* copyInst = irm->newInst(mn,dstAddr,srcAddr,counter);
     copyInst->setPrefix(InstPrefix_REP);
     currNode->appendInst(copyInst);
-
-    callInst->unlink();
 }
 
 void System_arraycopyReverse_Handler::run()
 {
     Node* currNode = callInst->getNode();
-    currNode->appendInst(irm->newInst(Mnemonic_PUSHFD));
-    currNode->appendInst(irm->newInst(Mnemonic_STD));
+    irm->newInst(Mnemonic_PUSHFD)->insertBefore(callInst);
+    irm->newInst(Mnemonic_STD)->insertBefore(callInst);
     System_arraycopyDirect_Handler directHandler(irm, callInst, NULL);
     directHandler.run();
 



Mime
View raw message