harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Timoshenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4520) [drlvm][jit][opt] copyexpantion pass may crash because of spillgen's work
Date Tue, 24 Jul 2007 05:07:31 GMT
[drlvm][jit][opt] copyexpantion pass may crash because of spillgen's work
-------------------------------------------------------------------------

                 Key: HARMONY-4520
                 URL: https://issues.apache.org/jira/browse/HARMONY-4520
             Project: Harmony
          Issue Type: Bug
            Reporter: George Timoshenko


The problem is in code:

Inst * IRManager::newCopySequence(Opnd * targetBOpnd, Opnd * sourceBOpnd, uint32 regUsageMask,
uint32 flagsRegUsageMask)
{ 
.....

    if (targetKind&OpndKind_Reg) {
        if(sourceOpnd->isPlacedIn(OpndKind_Imm) && sourceOpnd->getImmValue()==0
&& targetKind==OpndKind_GPReg && 
            !sourceOpnd->getRuntimeInfo() && !(getRegMask(RegName_EFLAGS)&flagsRegUsageMask))
{
            return newInst(Mnemonic_XOR,targetOpnd, targetOpnd);
        }
        else if (targetKind==OpndKind_XMMReg && sourceOpnd->getMemOpndKind()==MemOpndKind_ConstantArea)
{
#ifdef _EM64T_
            Opnd * addr = NULL;
            Opnd * base = sourceOpnd->getMemOpndSubOpnd(MemOpndSubOpndKind_Base);
            if(base) {
                Inst * defInst = base->getDefiningInst();
                if(defInst && defInst->getMnemonic() == Mnemonic_MOV) {
                    addr = defInst->getOpnd(1);
                    if(!addr->getRuntimeInfo())    <-- spillgen can insert an inst between
the definition of constant and its load !!!!!!!
                        addr = NULL;
                }
            }
#else
            Opnd * addr = sourceOpnd->getMemOpndSubOpnd(MemOpndSubOpndKind_Displacement);
#endif
            void * fpPtr = (void *)((ConstantAreaItem *)addr->getRuntimeInfo()->getValue(0))->getValue();
<---- addr->getRuntimeInfo() may be 0 in this case
            if( addr && addr->getRuntimeInfo()->getKind()==Opnd::RuntimeInfo::Kind_ConstantAreaItem)
{

we need to try 1 inst deeper if addr->getRuntimeInfo() gives 0 for the fisrt step






-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message