Added print Allocation info will print
[fw/sdcc] / src / SDCCglue.c
index 4920cd18d98aea3fe4e9a5f2c4d0997e76e7d8c8..31ebf5b94868cae645376ba620bd58a5bf646995 100644 (file)
@@ -35,6 +35,7 @@ set *externs = NULL;          /* Varibles that are declared as extern */
 
 /* TODO: this should be configurable (DS803C90 uses more than 6) */
 int maxInterrupts = 6;
+int allocInfo = 1;
 extern int maxRegBank ;
 symbol *mainf;
 extern char *VersionString;
@@ -228,7 +229,9 @@ static void emitRegularMap (memmap * map, bool addPublics, bool arFlag)
                ival = newNode ('=', newAst (EX_VALUE, symbolVal (sym)),
                                decorateType (resolveSymbols (list2expr (sym->ival))));
            codeOutFile = statsg->oFile;
+           allocInfo = 0;
            eBBlockFromiCode (iCodeFromAst (ival));
+           allocInfo = 1;
            sym->ival = NULL;
        }
     }
@@ -1048,7 +1051,8 @@ void glue ()
     
     /* print the global variables in this module */
     printPublics (asmFile);
-    printExterns (asmFile);
+    if (port->assembler.externGlobal)
+       printExterns (asmFile);
 
     /* copy the sfr segment */
     fprintf (asmFile, "%s", iComments2);