* device/include/pic16/pic18f*.h: add bit aliases in INTCONbits_t
[fw/sdcc] / src / mcs51 / ralloc.c
index 7ce56c40ef12f5b00a537322d9a74c453ff9e2d6..2a627aade38fade32b735d965faa979edbcdd4f7 100644 (file)
@@ -1510,6 +1510,10 @@ static void fillGaps()
 
         if (!sym->spillA || !sym->clashes || sym->remat) continue ;
 
+        /* if spilt in direct space the original rname is lost */
+        if (sym->usl.spillLoc && (IN_DIRSPACE (SPEC_OCLS (sym->usl.spillLoc->etype))))
+            continue;
+
         /* find the liveRanges this one clashes with, that are
            still assigned to registers & mark the registers as used*/
         for ( i = 0 ; i < sym->clashes->size ; i ++) {
@@ -3011,6 +3015,7 @@ packRegisters (eBBlock ** ebpp, int blockno)
           IS_SYMOP (IC_RIGHT (ic)) &&
           OP_SYMBOL (IC_RIGHT (ic))->remat &&
           !IS_CAST_ICODE(OP_SYMBOL (IC_RIGHT (ic))->rematiCode) &&
+          !isOperandGlobal(IC_RESULT(ic)) &&          /* due to bug 1618050 */
           bitVectnBitsOn (OP_SYMBOL (IC_RESULT (ic))->defs) <= 1)
         {
           OP_SYMBOL (IC_RESULT (ic))->remat =
@@ -3225,7 +3230,7 @@ packRegisters (eBBlock ** ebpp, int blockno)
       /* pack registers for accumulator use, when the
          result of an arithmetic or bit wise operation
          has only one use, that use is immediately following
-         the defintion and the using iCode has only one
+         the definition and the using iCode has only one
          operand or has two operands but one is literal &
          the result of that operation is not on stack then
          we can leave the result of this operation in acc:b