]> git.gag.com Git - fw/sdcc/commitdiff
* device/lib/pic16/libsdcc/float/ updated contents of all sources,
authorvrokas <vrokas@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 9 Jul 2004 23:35:21 +0000 (23:35 +0000)
committervrokas <vrokas@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 9 Jul 2004 23:35:21 +0000 (23:35 +0000)
* device/include/pic16/float.h: enabled prototypes of float support
functions,
* src/pic16/pcode.c: fixed bug #974733, nothing to do with _naked
attribute though

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

ChangeLog
src/pic16/pcode.c

index ffd68ebadcd9bc0302b2db05c9b386b07722957a..31156533ae03246189b0943c4dc32b80c99b2de2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
+
+$Revision$
index 89491149df08425d34b400e8512742ebee51d88f..f2744b3bac6eea7f483acf0824f6e4be0d11ad3a 100644 (file)
@@ -3528,7 +3528,17 @@ static void destructpCodeFlow(pCode *pc)
   deleteSet(&PCFL(pc)->registers);
   deleteSet(&PCFL(pc)->from);
   deleteSet(&PCFL(pc)->to);
-  free(pc);
+
+  /* Instead of deleting the memory used by this pCode, mark
+   * the object as bad so that if there's a pointer to this pCode
+   * dangling around somewhere then (hopefully) when the type is
+   * checked we'll catch it.
+   */
+
+  pc->type = PC_BAD;
+  pic16_addpCode2pBlock(pb_dead_pcodes, pc);
+
+//  free(pc);
 
 }
 
@@ -3671,7 +3681,16 @@ static void pCodeLabelDestruct(pCode *pc)
   if((pc->type == PC_LABEL) && PCL(pc)->label)
     free(PCL(pc)->label);
 
-  free(pc);
+  /* Instead of deleting the memory used by this pCode, mark
+   * the object as bad so that if there's a pointer to this pCode
+   * dangling around somewhere then (hopefully) when the type is
+   * checked we'll catch it.
+   */
+
+  pc->type = PC_BAD;
+  pic16_addpCode2pBlock(pb_dead_pcodes, pc);
+
+//  free(pc);
 
 }
 
@@ -4401,15 +4420,13 @@ static void genericDestruct(pCode *pc)
    */
 
   pc->type = PC_BAD;
-
   pic16_addpCode2pBlock(pb_dead_pcodes, pc);
 
   //free(pc);
-
 }
 
 
-
+void DEBUGpic16_emitcode (char *inst,char *fmt, ...);
 /*-----------------------------------------------------------------*/
 /*-----------------------------------------------------------------*/
 /* modifiers for constant immediate */