X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCglue.c;h=1a4913767ad331b6a58c8b801cf55487f272b63d;hb=238e1b53dc1ac88bd559c93bd7f355d0887d39e1;hp=47584b541fdcdbad0a014a3fdabfcaef069159d7;hpb=67ed241504134df14b300e4ccd6e16a896977e71;p=fw%2Fsdcc diff --git a/src/SDCCglue.c b/src/SDCCglue.c index 47584b54..1a491376 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -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; @@ -1243,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, @@ -1354,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"); + } } } }