SPEC_SCLS (sym->etype) == S_SBIT)
{
- /* if both absolute address & initial */
- /* value specified then error */
- if (IS_ABSOLUTE (sym->etype) && sym->ival)
- {
- werror (E_SFR_INIT, sym->name);
- sym->ival = NULL;
- }
-
SPEC_OCLS (sym->etype) =
(SPEC_SCLS (sym->etype) == S_SFR ? sfr : sfrbit);
if (!lval->sym->isref)
{
lval->sym->allocreq = 0;
- werror (W_NO_REFERENCE, currFunc->name,
- "function argument", lval->sym->name);
+ werror (W_NO_REFERENCE,
+ currFunc ? currFunc->name : "(unknown)",
+ "function argument", lval->sym->name);
}
/* move the rname if any to the name for both val & sym */
if (SPEC_SCLS (sym->etype) == S_SFR ||
SPEC_SCLS (sym->etype) == S_SBIT)
{
-
- /* if both absolute address & initial */
- /* value specified then error */
- if (IS_ABSOLUTE (sym->etype) && sym->ival)
- {
- werror (E_SFR_INIT, sym->name);
- sym->ival = NULL;
- }
-
SPEC_OCLS (sym->etype) =
(SPEC_SCLS (sym->etype) == S_SFR ? sfr : sfrbit);
will remove and put into the 'data' segment if required after
overlay analysis has been done */
if (options.model == MODEL_SMALL) {
- SPEC_OCLS (sym->etype) =
- (options.noOverlay ? port->mem.default_local_map
- : overlay);
+ SPEC_OCLS (sym->etype) =
+ (options.noOverlay ? port->mem.default_local_map
+ : overlay);
} else {
- SPEC_OCLS (sym->etype) = port->mem.default_local_map;
+ SPEC_OCLS (sym->etype) = port->mem.default_local_map;
}
allocIntoSeg (sym);
}
}
/* if not used give a warning */
if (!sym->isref && !IS_STATIC (sym->etype))
- werror (W_NO_REFERENCE, currFunc->name,
+ werror (W_NO_REFERENCE,
+ currFunc ? currFunc->name : "(unknown)",
"local variable", sym->name);
/* now delete it from the symbol table */
deleteSym (SymbolTab, sym, sym->name);
xsPtr += size;
}
- /* if the debug option is set then output the
- symbols to the map file */
- if (options.debug)
- {
- for (sym = setFirstItem (istack->syms); sym;
- sym = setNextItem (istack->syms))
- cdbSymbol (sym, cdbFile, FALSE, FALSE);
-
- for (sym = setFirstItem (xstack->syms); sym;
- sym = setNextItem (xstack->syms))
- cdbSymbol (sym, cdbFile, FALSE, FALSE);
- }
}
/*-----------------------------------------------------------------*/
void
printAllocInfo (symbol * func, FILE * of)
{
+ if (!func)
+ return;
+
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);