From 66b19d48a14efe14d611cb535e304ba5efa030a6 Mon Sep 17 00:00:00 2001 From: tecodev Date: Thu, 1 Feb 2007 10:21:08 +0000 Subject: [PATCH] * src/pic/glue.c (picglue,emitSymbolSet,showAllMemmaps): emit the config words again git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4611 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 5 +++++ src/pic/glue.c | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index eaee037a..2c0740e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-02-01 Raphael Neider + + * src/pic/glue.c (picglue,emitSymbolSet,showAllMemmaps): emit the + config words again + 2007-01-31 Borut Razem * support/Util/dbuf_string.h: added ATTRIBUTE_PRINTF to dbuf_printf() diff --git a/src/pic/glue.c b/src/pic/glue.c index 563bd7fd..b2780700 100644 --- a/src/pic/glue.c +++ b/src/pic/glue.c @@ -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); -- 2.30.2