harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r518528 - in /harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32: Ia32IRManager.cpp Ia32Inst.cpp Ia32Inst.h
Date Thu, 15 Mar 2007 09:07:25 GMT
Author: varlax
Date: Thu Mar 15 02:07:24 2007
New Revision: 518528

URL: http://svn.apache.org/viewvc?view=rev&rev=518528
Log:
Applied HARMONY-3234 [drlvm][jit] debug OPT segfaults on EHWA

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

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=518528&r1=518527&r2=518528
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp Thu Mar
15 02:07:24 2007
@@ -220,10 +220,16 @@
 {
     Inst * instList = NULL;
 #ifndef _EM64T_
-    SwitchInst * inst=new(memoryManager, 1) SwitchInst(Mnemonic_JMP, instId++);
     assert(numTargets>0);
     assert(index!=NULL);
-    Opnd * targetOpnd=newSwitchTableConstantMemOpnd(numTargets, index);
+    Opnd* targetOpnd=newSwitchTableConstantMemOpnd(numTargets, index);
+    // Extract the switch table constant address that is stored as 
+    // displacement on IA32. 
+    // This tableAddress in SwitchInst is kept separately [from getOpnd(0)]
+    // so it allows to replace an Opnd (used in SpillGen) and keep the table 
+    // itself intact.
+    Opnd* tableAddr = targetOpnd->getMemOpndSubOpnd(MemOpndSubOpndKind_Displacement);
+    SwitchInst * inst=new(memoryManager, 1) SwitchInst(Mnemonic_JMP, instId++, tableAddr);
 #else
     
     ConstantAreaItem * item=newSwitchTableConstantAreaItem(numTargets);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.cpp?view=diff&rev=518528&r1=518527&r2=518528
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.cpp Thu Mar 15
02:07:24 2007
@@ -755,11 +755,7 @@
 //_________________________________________________________________________________________________
 Opnd * SwitchInst::getTableAddress() const
 {
-#ifdef _EM64T_
     return tableAddr;
-#else
-    return getOpnd(0)->getMemOpndSubOpnd(MemOpndSubOpndKind_Displacement);
-#endif
 }
 
 //_________________________________________________________________________________________________

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.h?view=diff&rev=518528&r1=518527&r2=518528
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.h Thu Mar 15 02:07:24
2007
@@ -1123,10 +1123,8 @@
     
     virtual void verify() const;
 protected:
-    SwitchInst(Mnemonic mnemonic,  int id, Opnd * addr = 0)  : ControlTransferInst(mnemonic,
id)
-#ifdef _EM64T_
-                                              , tableAddr(addr)
-#endif
+    SwitchInst(Mnemonic mnemonic,  int id, Opnd * addr = 0) : 
+            ControlTransferInst(mnemonic, id), tableAddr(addr)
         {kind=Kind_SwitchInst; }
 
 
@@ -1138,11 +1136,7 @@
     virtual void removeRedundantBranch();
 
     void replaceTarget(Node* bbFrom, Node* bbTo);
-
-#ifdef _EM64T_
     Opnd * tableAddr;
-#endif
-
 };
 
 //=========================================================================================================



Mime
View raw message