X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fxa51%2Fralloc.c;h=ac0d124b5685e071839b972532f723ae18037250;hb=90bdb43b342189fcb94a398855d43f3f47f96738;hp=e53ea595c02c987a99c39502c29283de222a8549;hpb=ec58d965706980b34d054c87c6359e7800bfe725;p=fw%2Fsdcc diff --git a/src/xa51/ralloc.c b/src/xa51/ralloc.c index e53ea595..ac0d124b 100755 --- a/src/xa51/ralloc.c +++ b/src/xa51/ralloc.c @@ -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); }