* src/SDCCpeeph.c (replaceRule): support empty replacement peephole
[fw/sdcc] / src / SDCCmem.c
index ba185d241e3da2d5a2e5e95dcc43c705040ada54..dc0982b44137381faf5189e571f0a864e171194a 100644 (file)
@@ -994,11 +994,18 @@ printAllocInfoSeg (memmap * map, symbol * func, FILE * of)
          int i;
 
          sym = OP_SYMBOL (sym->reqv);
-         fprintf (of, "to registers ");
-         for (i = 0; i < 4 && sym->regs[i]; i++)
-           fprintf (of, "%s ", port->getRegName (sym->regs[i]));
-         fprintf (of, "\n");
-         continue;
+         if (!sym->isspilt || sym->remat)
+           {
+             fprintf (of, "to registers ");
+             for (i = 0; i < 4 && sym->regs[i]; i++)
+               fprintf (of, "%s ", port->getRegName (sym->regs[i]));
+             fprintf (of, "\n");
+             continue;
+           }
+         else
+           {
+             sym = sym->usl.spillLoc;
+           }
        }
 
       /* if on stack */