* src/pic/glue.c (picglue,emitSymbolSet,showAllMemmaps): emit the
authortecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 1 Feb 2007 10:21:08 +0000 (10:21 +0000)
committertecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 1 Feb 2007 10:21:08 +0000 (10:21 +0000)
    config words again

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4611 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/pic/glue.c

index eaee037aac8e9c9dce834fc25db399df9115a35e..2c0740e9b7031784c5308fbde30475e5f768cc86 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-02-01 Raphael Neider <rneider AT web.de>
+
+       * src/pic/glue.c (picglue,emitSymbolSet,showAllMemmaps): emit the
+           config words again
+
 2007-01-31 Borut Razem <borut.razem AT siol.net>
 
        * support/Util/dbuf_string.h: added ATTRIBUTE_PRINTF to dbuf_printf()
index 563bd7fd7360737ebeddcb4ad8a6259cf51fec68..b2780700288a62f5d0f146054d3292a2f862e69c 100644 (file)
@@ -1465,9 +1465,6 @@ picglue ()
                port->genAssemblerPreamble(asmFile);
        }
 
-       /* Emit the __config directive */
-       pic14_emitConfigWord (asmFile);
-       
        /* print the global variables in this module */
        //pic14printPublics (asmFile);
        
@@ -2061,6 +2058,17 @@ emitSymbolSet(set *s, int type)
                sym->name, sym->rname, sym->level, sym->block, sym->key, sym->islocal, sym->ival, IS_STATIC(sym->etype), sym->cdef, sym->used);
 #endif
 
+       if (SPEC_ABSA(sym->etype)
+               && IS_CONFIG_ADDRESS(SPEC_ADDR(sym->etype))
+               && sym->ival)
+       {
+           // handle config words
+           pic14_assignConfigWordValue(SPEC_ADDR(sym->etype),
+                   (int)list2int(sym->ival));
+           pic14_stringInSet(sym->rname, &emitted, 1);
+           continue;
+       }
+
        if (sym->isstrlit) {
            // special case: string literals
            emitInitVal(ivalBuf, sym, sym->type, NULL);
@@ -2158,8 +2166,8 @@ showAllMemmaps(FILE *of)
 
     emitPseudoStack(gloBuf, extBuf);
     pic14_constructAbsMap(gloDefBuf, gloBuf);
-
     pic14printLocals (&locBuf);
+    pic14_emitConfigWord(of); // must be done after all the rest
 
     dbuf_write_and_destroy(extBuf, of);
     dbuf_write_and_destroy(gloBuf, of);