harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfur...@apache.org
Subject svn commit: r636777 - in /harmony/enhanced/drlvm/trunk/vm/jitrino/src: codegenerator/ia32/Ia32i586InstsExpansion.cpp optimizer/IRBuilder.cpp optimizer/IRBuilder.h
Date Thu, 13 Mar 2008 15:03:03 GMT
Author: mfursov
Date: Thu Mar 13 08:02:57 2008
New Revision: 636777

URL: http://svn.apache.org/viewvc?rev=636777&view=rev
Log:
Fix for HARMONY-5595 [drlvm][jit][opt] Incorrect bcmapping on block starts
Fix for HARMONY-5600 [drlvm][jit][opt] Problems with compilation with OPT on Athlon XP


Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32i586InstsExpansion.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.h

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32i586InstsExpansion.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32i586InstsExpansion.cpp?rev=636777&r1=636776&r2=636777&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32i586InstsExpansion.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32i586InstsExpansion.cpp
Thu Mar 13 08:02:57 2008
@@ -36,7 +36,7 @@
 //========================================================================================
 //========================================================================================
 /**
-    class I586InstsExpansion translated SSE instructions to corresponding x87 instructions

+    I586InstsExpansion translates SSE2 instructions and newer to the corresponding SSE and
x87 instructions 
     and SETcc and CMOVcc instructions to branches
 */
 class I586InstsExpansion : public SessionAction {
@@ -92,6 +92,8 @@
         case Mnemonic_UCOMISS:
         case Mnemonic_CVTTSS2SI:
         case Mnemonic_CVTTSD2SI:
+        case Mnemonic_CVTSI2SS:
+        case Mnemonic_CVTSI2SD:
             return true;
         default:
             return false;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.cpp?rev=636777&r1=636776&r2=636777&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.cpp Thu Mar 13 08:02:57
2008
@@ -312,21 +312,26 @@
     assert(0);
 }
 
-Inst* IRBuilder::appendInst(Inst* inst) {
-    assert(currentLabel);
-    inst->setBCOffset((uint16)offset);
-    Node* node = currentLabel->getNode();
-
-    assert(currentLabel->getBCOffset()!=ILLEGAL_BC_MAPPING_VALUE || node->isEmpty());
-    if (node->isEmpty() && currentLabel->getBCOffset()==ILLEGAL_BC_MAPPING_VALUE)
{
+void IRBuilder::updateCurrentLabelBcOffset() {
+    assert(currentLabel!=NULL);
+    if (currentLabel->getBCOffset()==ILLEGAL_BC_MAPPING_VALUE) {
+        assert(currentLabel->getNode() == NULL || currentLabel->getNode()->isEmpty());
         currentLabel->setBCOffset((uint16)offset);
     }
+}
+
+
+Inst* IRBuilder::appendInst(Inst* inst) {
+    updateCurrentLabelBcOffset();
     assert(currentLabel->getBCOffset()!=ILLEGAL_BC_MAPPING_VALUE);
 
+    inst->setBCOffset((uint16)offset);
+    Node* node = currentLabel->getNode();
+
     node->appendInst(inst);
     if(Log::isEnabled()) {
         inst->print(Log::out());
-        Log::out() << ::std::endl;
+        Log::out() << std::endl;
         Log::out().flush();
     }
     return inst;
@@ -339,24 +344,29 @@
 void IRBuilder::genLabel(LabelInst* labelInst) {
     cseHashTable->kill();
     currentLabel = labelInst;
+    updateCurrentLabelBcOffset();
+
     if(Log::isEnabled()) {
         currentLabel->print(Log::out());
-        Log::out() << ::std::endl;
+        Log::out() << std::endl;
         Log::out().flush();
     }
 }
 
 void IRBuilder::genFallThroughLabel(LabelInst* labelInst) {
     currentLabel = labelInst;
+    updateCurrentLabelBcOffset();
+
     if(Log::isEnabled()) {
         currentLabel->print(Log::out());
-        Log::out() << ::std::endl;
+        Log::out() << std::endl;
         Log::out().flush();
     }
 }
 
 LabelInst* IRBuilder::createLabel() {
     currentLabel = (LabelInst*)instFactory->makeLabel();
+    updateCurrentLabelBcOffset();
     return currentLabel;
 }
 
@@ -367,16 +377,15 @@
 }
 
 LabelInst* IRBuilder::genMethodEntryLabel(MethodDesc* methodDesc) {
-    LabelInst* labelInst = instFactory->makeMethodEntryLabel(methodDesc);
-    currentLabel = labelInst;
-    labelInst->setBCOffset(0);
+    currentLabel = instFactory->makeMethodEntryLabel(methodDesc);
+    currentLabel->setBCOffset(0);
 
     if(Log::isEnabled()) {
         currentLabel->print(Log::out());
-        Log::out() << ::std::endl;
+        Log::out() << std::endl;
         Log::out().flush();
     }
-    return labelInst;
+    return currentLabel;
 }
 
 // compute instructions

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.h?rev=636777&r1=636776&r2=636777&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.h Thu Mar 13 08:02:57
2008
@@ -396,6 +396,8 @@
 private:
 
     void readFlagsFromCommandLine(SessionAction* argSource, const char* argPrefix);
+    void updateCurrentLabelBcOffset();
+
 
 private:
     //



Mime
View raw message