* src/SDCCast.c (processParams): added new type flow and restructured
[fw/sdcc] / src / SDCCglue.c
index fde4be676a54ff4a3ffe55998217b2d2c0e7e716..1a4913767ad331b6a58c8b801cf55487f272b63d 100644 (file)
@@ -294,7 +294,7 @@ emitRegularMap (memmap * map, bool addPublics, bool arFlag)
           else
             DCL_PTR_CONST (newSym->type) = 1;
          SPEC_STAT(newSym->etype)=1;
-         resolveIvalSym(newSym->ival);
+         resolveIvalSym(newSym->ival, newSym->type);
 
          // add it to the "XINIT (CODE)" segment
          addSet(&xinit->syms, newSym);
@@ -308,7 +308,7 @@ emitRegularMap (memmap * map, bool addPublics, bool arFlag)
                      sym->name);
            }
            ival = newNode ('=', newAst_VALUE (symbolVal (sym)),
-                           decorateType (resolveSymbols (list2expr (sym->ival))));
+                           decorateType (resolveSymbols (list2expr (sym->ival)), RESULT_CHECK));
          }
          codeOutFile = statsg->oFile;
 
@@ -546,6 +546,11 @@ printChar (FILE * ofile, char *s, int plen)
       else
        len = 0;
     }
+  while (pplen < plen)
+    {
+      tfprintf (ofile, "\t!db !constbyte\n", 0);
+      pplen++;
+    }
 }
 
 /*-----------------------------------------------------------------*/
@@ -1238,7 +1243,7 @@ emitStaticSeg (memmap * map, FILE * out)
            {
              fprintf (out, "%s:\n", sym->rname);
              noAlloc++;
-             resolveIvalSym (sym->ival);
+             resolveIvalSym (sym->ival, sym->type);
              printIval (sym, sym->type, sym->ival, out);
              noAlloc--;
              /* if sym is a simple string and sym->ival is a string, 
@@ -1349,14 +1354,21 @@ createInterruptVect (FILE * vFile)
 
       fprintf (vFile, "\tljmp\t__sdcc_gsinit_startup\n");
 
-
       /* now for the other interrupts */
       for (; i < maxInterrupts; i++)
        {
          if (interrupts[i])
-           fprintf (vFile, "\tljmp\t%s\n\t.ds\t5\n", interrupts[i]->rname);
+           {
+             fprintf (vFile, "\tljmp\t%s\n", interrupts[i]->rname);
+             if ( i != maxInterrupts - 1 )
+               fprintf (vFile, "\t.ds\t5\n");
+           }
          else
-           fprintf (vFile, "\treti\n\t.ds\t7\n");
+           {
+             fprintf (vFile, "\treti\n");
+             if ( i != maxInterrupts - 1 )
+               fprintf (vFile, "\t.ds\t7\n");
+           }
        }
     }
 }