Signed comparisons are now working (except for signed longs)
[fw/sdcc] / src / pic / glue.c
index 32f86b4e5ce2b776f7cc41295617e041f8b225f8..81c86b3665c9ae2b01e5d6ef59ca8afdff66e210 100644 (file)
@@ -33,7 +33,7 @@ extern symbol *interrupts[256];
 void printIval (symbol *, sym_link *, initList *, FILE *);
 extern int noAlloc;
 extern set *publics;
-extern int maxInterrupts;
+extern unsigned maxInterrupts;
 extern int maxRegBank;
 extern symbol *mainf;
 extern char *VersionString;
@@ -105,7 +105,7 @@ int pic14aopLiteral (value *val, int offset)
   /* if it is a float then it gets tricky */
   /* otherwise it is fairly simple */
   if (!IS_FLOAT(val->type)) {
-    unsigned long v = floatFromVal(val);
+    unsigned long v = (unsigned long) floatFromVal(val);
 
     //v >>= (offset * 8);
     return ( (v >> (offset * 8)) & 0xff);
@@ -806,7 +806,7 @@ pic14emitMaps ()
 static void
 pic14createInterruptVect (FILE * vFile)
 {
-  int i = 0;
+  unsigned i = 0;
   mainf = newSymbol ("main", 0);
   mainf->block = 0;
 
@@ -1106,7 +1106,7 @@ picglue ()
     
 
   /* Put all variables into a cblock */
-  fprintf (asmFile, "\n\n\tcblock  0x0c\n\n");
+  fprintf (asmFile, "\n\n\tcblock  0x20\n\n");
 
   for(i=0; i<pic14_nRegs; i++) {
     if(regspic14[i].wasUsed && (regspic14[i].offset>=0x0c) )