* as/hc08/lkaomf51.c (OutputName),
[fw/sdcc] / src / xa51 / ralloc.c
index e53ea595c02c987a99c39502c29283de222a8549..ac0d124b5685e071839b972532f723ae18037250 100755 (executable)
@@ -127,7 +127,7 @@ regs *xa51_regWithMask (unsigned long mask) {
 /* checkRegsMask - check the consistancy of the regMask redundancy */
 /*-----------------------------------------------------------------*/
 
-void checkRegMask(char *f) { // for debugging purposes only
+void checkRegMask(const char *f) { // for debugging purposes only
   int i;
   unsigned long regMask=0;
   
@@ -199,8 +199,8 @@ static void freeReg (regs * reg, bool silent) {
 /* allocReg - allocates register of given size (byte, word, dword) */
 /*            and type (ptr, gpr, cnd)                             */
 /*-----------------------------------------------------------------*/
-static bool allocReg (short size, short type, symbol *sym, 
-                     short offset, bool silent) {
+static bool allocReg (unsigned int size, int type, symbol *sym, 
+                     int offset, bool silent) {
   int i;
   
   checkRegMask(__FUNCTION__);
@@ -2059,8 +2059,10 @@ static void packRegisters (eBBlock * ebp) {
 /* assignRegisters - assigns registers to each live range as need  */
 /*-----------------------------------------------------------------*/
 void
-xa51_assignRegisters (eBBlock ** ebbs, int count)
+xa51_assignRegisters (ebbIndex * ebbi)
 {
+  eBBlock ** ebbs = ebbi->bbOrder;
+  int count = ebbi->count;
   iCode *ic;
   int i;
   
@@ -2078,7 +2080,7 @@ xa51_assignRegisters (eBBlock ** ebbs, int count)
   recomputeLiveRanges (ebbs, count);
 
   if (options.dump_pack)
-    dumpEbbsToFileExt (DUMP_PACK, ebbs, count);
+    dumpEbbsToFileExt (DUMP_PACK, ebbi);
   
   /* first determine for each live range the number of 
      registers & the type of registers required for each */
@@ -2106,7 +2108,7 @@ xa51_assignRegisters (eBBlock ** ebbs, int count)
   
   if (options.dump_rassgn)
     {
-      dumpEbbsToFileExt (DUMP_RASSGN, ebbs, count);
+      dumpEbbsToFileExt (DUMP_RASSGN, ebbi);
       dumpLiveRanges (DUMP_LRANGE, liveRanges);
     }