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 2006/12/21 11:31:04 UTC
svn commit: r489317 -
/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RCE.cpp
Author: varlax
Date: Thu Dec 21 02:31:04 2006
New Revision: 489317
URL: http://svn.apache.org/viewvc?view=rev&rev=489317
Log:
Applied HARMONY-2830 EUT org.eclipse.jdt.core.tests.dom.RunAllTests test case crashes in JIT.
Tested on SUSE9@ia32, SUSE9@x64.
Modified:
harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RCE.cpp
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RCE.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RCE.cpp?view=diff&rev=489317&r1=489316&r2=489317
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RCE.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RCE.cpp Thu Dec 21 02:31:04 2006
@@ -124,7 +124,8 @@
if(inst->getOpnd(defCount+1)->isPlacedIn(OpndKind_Imm)) {
//try to change conditional instruction to make combination available to optimize
cmpOp = inst->getOpnd(defCount);
- Inst * newCondInst; Mnemonic mnem;
+ Inst * newCondInst = NULL;
+ Mnemonic mnem;
int64 val = inst->getOpnd(defCount+1)->getImmValue();
if (val == 0) {
@@ -142,10 +143,17 @@
if (condInst->hasKind(Inst::Kind_BranchInst)) {
BranchInst* br = (BranchInst*)condInst;
newCondInst = irManager->newBranchInst(mnem,br->getTrueTarget(), br->getFalseTarget(), condInst->getOpnd(0));
- } else if (condInst->getForm() == Inst::Form_Native ) {
- newCondInst = irManager->newInst(mnem, condInst->getOpnd(0), condInst->getOpnd(1));
} else {
- newCondInst = irManager->newInstEx(mnem, condInst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Def), condInst->getOpnd(0), condInst->getOpnd(1));
+ Inst::Opnds defs(condInst,Inst::OpndRole_Def|Inst::OpndRole_Explicit);
+ if (baseMnem == Mnemonic_CMOVcc) {
+ Inst::Opnds uses(condInst,Inst::OpndRole_Use|Inst::OpndRole_Explicit);
+ newCondInst = irManager->newInst(mnem, condInst->getOpnd(defs.begin()), inst->getOpnd(uses.begin()));
+ } else if (baseMnem == Mnemonic_SETcc) {
+ newCondInst = irManager->newInst(mnem, condInst->getOpnd(defs.begin()));
+ } else {
+ assert(0);
+ continue;
+ }
}
newCondInst->insertAfter(condInst);
condInst->unlink();