From c7d47a5b353160d334a7e89d40aad9920dad7709 Mon Sep 17 00:00:00 2001 From: bernhardheld Date: Fri, 15 Aug 2003 20:37:26 +0000 Subject: [PATCH] Fixed bug #787649 by anonymous * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr * src/ds390/gen.c (aopForSym): fixed func ptr in sloc git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2828 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 8 +++++++- src/SDCCglue.c | 2 +- src/ds390/gen.c | 6 +++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b42a0fa..17352c3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-08-13 Bernhard Held + + Fixed bug #787649 by anonymous + * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr + * src/ds390/gen.c (aopForSym): fixed func ptr in sloc + 2003-08-14 Erik Petrich Fixed numerous bitfield problems. @@ -10,7 +16,7 @@ * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs * support/regression/tests/bitfields.c: tests added - + 2003-08-13 Erik Petrich Made the constant following the "interrupt" keyword optional. If diff --git a/src/SDCCglue.c b/src/SDCCglue.c index b053850d..6e7a5a39 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -258,7 +258,7 @@ emitRegularMap (memmap * map, bool addPublics, bool arFlag) /* if extern then do nothing or is a function then do nothing */ - if (IS_FUNC (sym->type)) + if (IS_FUNC (sym->type) && !(sym->isitmp)) continue; /* print extra debug info if required */ diff --git a/src/ds390/gen.c b/src/ds390/gen.c index a5b88a72..e2d30462 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -602,14 +602,14 @@ aopForSym (iCode * ic, symbol * sym, bool result, bool useDP2) } /* special case for a function */ - if (IS_FUNC (sym->type)) + if (IS_FUNC (sym->type) && !(sym->isitmp)) { sym->aop = aop = newAsmop (AOP_IMMD); - aop->aopu.aop_immd.aop_immd1 = Safe_strdup(sym->rname); + aop->aopu.aop_immd.aop_immd1 = Safe_strdup(sym->rname); aop->size = FPTRSIZE; return aop; } - + /* only remaining is far space */ /* in which case DPTR gets the address */ sym->aop = aop = newAsmop ((short) (useDP2 ? AOP_DPTR2 : AOP_DPTR)); -- 2.30.2