fixed a small bug with large effects
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 21 May 2001 09:40:05 +0000 (09:40 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 21 May 2001 09:40:05 +0000 (09:40 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@842 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/avr/gen.c
src/ds390/gen.c
src/mcs51/gen.c
src/pic/gen.c
src/z80/gen.c

index b16ce95425ff357429a4c7f8516cb2c3c3b2b515..0a9bd9a359390db66920aeb36e1f587de5795a45 100644 (file)
@@ -2890,7 +2890,7 @@ genInline (iCode * ic)
 
        _G.inLine += (!options.asmpeep);
 
-       buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic)+1));
+       buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic))+1);
        strcpy (buffer, IC_INLINE (ic));
 
        /* emit each line as a code */
index 0f1df71133dfe41db19a150bd695e85792107ccb..cc326219e363b05f5ad891890ef089a207585335 100644 (file)
@@ -5784,7 +5784,7 @@ genInline (iCode * ic)
 
   _G.inLine += (!options.asmpeep);
 
-  buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic)+1));
+  buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic))+1);
   strcpy (buffer, IC_INLINE (ic));
 
   /* emit each line as a code */
index 8fe501bab5eaf9bc2f9797dc71dff3e71a2ba4a0..6ad7a2a2d98917dbd8593bfc60559dc989df45a8 100644 (file)
@@ -1,3 +1,4 @@
+void CatchMe() {}
 /*-------------------------------------------------------------------------
   SDCCgen51.c - source file for code generation for 8051
 
@@ -1618,7 +1619,7 @@ genIpush (iCode * ic)
   int size, offset = 0;
   char *l;
 
-
+  CatchMe();
   /* if this is not a parm push : ie. it is spill push
      and spill push is always done on the local stack */
   if (!ic->parmPush)
@@ -4991,6 +4992,7 @@ release:
 /*-----------------------------------------------------------------*/
 /* genInline - write the inline code out                           */
 /*-----------------------------------------------------------------*/
+char *johan;
 static void
 genInline (iCode * ic)
 {
@@ -4998,7 +5000,7 @@ genInline (iCode * ic)
 
   _G.inLine += (!options.asmpeep);
 
-  buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic)+1));
+  buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic))+1);
   strcpy (buffer, IC_INLINE (ic));
 
   /* emit each line as a code */
@@ -5007,6 +5009,7 @@ genInline (iCode * ic)
       if (*bp == '\n')
        {
          *bp++ = '\0';
+         johan=bp;
          emitcode (bp1, "");
          bp1 = bp;
        }
@@ -5017,6 +5020,7 @@ genInline (iCode * ic)
              bp++;
              *bp = '\0';
              bp++;
+             johan=bp;
              emitcode (bp1, "");
              bp1 = bp;
            }
index 20f57a1bb3e699528e43d91d500049883cfdf75b..52826154af9c8f4d3021c39046f9bbedb4624429 100644 (file)
@@ -4950,7 +4950,7 @@ static void genInline (iCode *ic)
 
     _G.inLine += (!options.asmpeep);
 
-    buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic)+1));
+    buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic))+1);
     strcpy(buffer,IC_INLINE(ic));
 
     /* emit each line as a code */
index 3e6d40a411c066dd63d9c5fe1c5af75a963bedc4..db85017267402abc9a5bb05968a3dac8b6a16547 100644 (file)
@@ -4086,7 +4086,7 @@ genInline (iCode * ic)
 
   inLine += (!options.asmpeep);
 
-  buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic)+1));
+  buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic))+1);
   strcpy (buffer, IC_INLINE (ic));
 
   /* emit each line as a code */