on stack */
int argreg; /* argument regno for SEND/RECEIVE */
int eBBlockNum; /* belongs to which eBBlock */
+ char riu; /* after ralloc, the registers in use */
}
iCode;
cln = ic->lineno;
}
if (options.iCodeInAsm) {
- emitcode("", ";ic:%d: %s", ic->key, printILine(ic));
+ char regsInUse[80];
+ int i;
+
+ for (i=0; i<8; i++) {
+ sprintf (®sInUse[i],
+ "%c", ic->riu & (1<<i) ? i+'0' : '-');
+ }
+ regsInUse[i]=0;
+ emitcode("", "; [%s] ic:%d: %s", regsInUse, ic->seq, printILine(ic));
}
/* if the result is marked as
spilt and rematerializable or code for
/* of all instructions do */
for (ic = ebbs[i]->sch; ic; ic = ic->next) {
+ int i;
+
+ // update the registers in use at the start of this icode
+ for (i=0; i<8; i++) {
+ if (regs8051[i].isFree) {
+ ic->riu &= ~(1<<regs8051[i].offset);
+ } else {
+ ic->riu |= (1<<regs8051[i].offset);
+ }
+ }
/* if this is an ipop that means some live
range will have to be assigned again */
int i;
setToNull ((void *) &_G.funcrUsed);
+ setToNull ((void *) &_G.regAssigned);
setToNull ((void *) &_G.totRegAssigned);
mcs51_ptrRegReq = _G.stackExtend = _G.dataExtend = 0;
mcs51_nRegs = 8;
serialRegAssign (ebbs, count);
freeAllRegs ();
+ setToNull ((void *) &_G.regAssigned);
+ setToNull ((void *) &_G.totRegAssigned);
fillGaps();
/* if stack was extended then tell the user */