You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Fursov (JIRA)" <ji...@apache.org> on 2007/07/25 13:59:31 UTC

[jira] Resolved: (HARMONY-4520) [drlvm][jit][opt] copyexpantion pass may crash because of spillgen's work

     [ https://issues.apache.org/jira/browse/HARMONY-4520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Fursov resolved HARMONY-4520.
-------------------------------------

    Resolution: Fixed

committed as r559409

> [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
>            Assignee: Mikhail Fursov
>         Attachments: ld_fp_const_spilled.patch
>
>
> 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.