xa51, work in progress
[fw/sdcc] / src / xa51 / ralloc.c
index 2ea867c8f943773313aa73f77447de9480d3c837..037e79830a8d88a10e18fd8d78ebcececbf1167a 100755 (executable)
@@ -1329,10 +1329,7 @@ regTypeNum (eBBlock *ebbs)
 #endif
 
          /* if the symbol has only one definition &
-            that definition is a get_pointer and the
-            pointer we are getting is rematerializable and
-            in "data" space */
-
+            that definition is a get_pointer */
          if (bitVectnBitsOn (sym->defs) == 1 &&
              (ic = hTabItemWithKey (iCodehTab,
                                     bitVectFirstBit (sym->defs))) &&
@@ -1340,12 +1337,10 @@ regTypeNum (eBBlock *ebbs)
              !sym->noSpilLoc &&
              !IS_BITVAR (sym->etype))
            {
-
-
-             /* if remat in data space */
+             /* and that pointer is remat in data space */
              if (OP_SYMBOL (IC_LEFT (ic))->remat &&
                  !IS_CAST_ICODE(OP_SYMBOL (IC_LEFT (ic))->rematiCode) &&
-                 DCL_TYPE (aggrToPtr (sym->type, FALSE)) == POINTER)
+                 DCL_TYPE (aggrToPtr (operandType(IC_LEFT(ic)), FALSE)) == POINTER)
                {
                  /* create a psuedo symbol & force a spil */
                  symbol *psym = newSymbol (rematStr (OP_SYMBOL (IC_LEFT (ic))), 1);
@@ -1469,7 +1464,6 @@ packRegsForAssign (iCode * ic, eBBlock * ebp)
 
   }
 
-  return 0;
   if (!dic)
     return 0;                  /* did not find */