+2004-01-07 Erik Petrich <epetrich@ivorytower.norman.ok.us>
+
+ * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
+ in bug #860505
+ * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
+ how the function variable allocation summary is displayed; also
+ include information about variables allocated to the overlay
+ segment
+
2004-01-06 Jesus Calvino-Fraga <jesusc@ece.ubc.ca>
* as/mcs51/lkmain.c: Help about -Y option
return;
if (!map->syms)
return;
-
+
for (sym = setFirstItem (map->syms); sym;
sym = setNextItem (map->syms))
{
continue;
if (sym->localof != func)
continue;
- fprintf (of, ";%-25s Allocated to ", sym->name);
+
+ fprintf (of, ";%-25s Allocated ", sym->name);
/* if assigned to registers */
if (!sym->allocreq && sym->reqv)
int i;
sym = OP_SYMBOL (sym->reqv);
- fprintf (of, "registers ");
+ fprintf (of, "to registers ");
for (i = 0; i < 4 && sym->regs[i]; i++)
fprintf (of, "%s ", port->getRegName (sym->regs[i]));
fprintf (of, "\n");
/* if on stack */
if (sym->onStack)
{
- fprintf (of, "stack - offset %d\n", sym->stack);
+ fprintf (of, "to stack - offset %d\n", sym->stack);
continue;
}
/* otherwise give rname */
- fprintf (of, "in memory with name '%s'\n", sym->rname);
+ fprintf (of, "with name '%s'\n", sym->rname);
}
}
if (!of)
of = stdout;
-
+
/* must be called after register allocation is complete */
fprintf (of, ";------------------------------------------------------------\n");
fprintf (of, ";Allocation info for local variables in function '%s'\n", func->name);
printAllocInfoSeg (idata, func, of);
printAllocInfoSeg (sfr, func, of);
printAllocInfoSeg (sfrbit, func, of);
+
+ {
+ set *ovrset;
+ set *tempOverlaySyms = overlay->syms;
+
+ /* search the set of overlay sets for local variables/parameters */
+ for (ovrset = setFirstItem (ovrSetSets); ovrset;
+ ovrset = setNextItem (ovrSetSets))
+ {
+ overlay->syms = ovrset;
+ printAllocInfoSeg (overlay, func, of);
+ }
+ overlay->syms = tempOverlaySyms;
+ }
+
fprintf (of, ";------------------------------------------------------------\n");
}
val->sym->etype = getSpec (val->sym->type);
val->sym->_isparm = 1;
strncpyz (val->sym->rname, val->name, sizeof(val->sym->rname));
+ #if 0
+ /* ?? static functions shouldn't imply static parameters - EEP */
if (IS_SPEC(func->etype)) {
SPEC_STAT (val->etype) = SPEC_STAT (val->sym->etype) =
SPEC_STAT (func->etype);
}
+ #endif
addSymChain (val->sym);
}
val->sym->_isparm = 1;
SPEC_OCLS (val->etype) = SPEC_OCLS (val->sym->etype) =
(options.model != MODEL_SMALL ? xdata : data);
+
+ #if 0
+ /* ?? static functions shouldn't imply static parameters - EEP */
if (IS_SPEC(func->etype)) {
SPEC_STAT (val->etype) = SPEC_STAT (val->sym->etype) =
SPEC_STAT (func->etype);
}
+ #endif
}
if (!isinSet(operKeyReset, val->sym)) {
addSet (&operKeyReset, val->sym);