Fixed bug #787649 by anonymous
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 15 Aug 2003 20:37:26 +0000 (20:37 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 15 Aug 2003 20:37:26 +0000 (20:37 +0000)
* 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
src/SDCCglue.c
src/ds390/gen.c

index 0b42a0fa3ef49d7f864af859a72aefe18cd65eb8..17352c3ae391d9a68f118fc8517ca47315a395a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-08-13  Bernhard Held <bernhard@bernhardheld.de>
+
+       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 <epetrich@ivorytower.norman.ok.us>
 
        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 <epetrich@ivorytower.norman.ok.us>
 
        Made the constant following the "interrupt" keyword optional. If
index b053850d0c2b7baeaca0333384874c70059d3142..6e7a5a3948bde89e96e7d7aff82ea7d789d0277b 100644 (file)
@@ -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 */
index a5b88a727074fcfea5f1604816c9bd147b00dcf8..e2d304629af2bc4301522d5362588bc80597fe30 100644 (file)
@@ -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));