summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9b41af2)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2495
4a8a32a2-be11-0410-ad9d-
d568d2c75423
on stack */
int argreg; /* argument regno for SEND/RECEIVE */
int eBBlockNum; /* belongs to which eBBlock */
on stack */
int argreg; /* argument regno for SEND/RECEIVE */
int eBBlockNum; /* belongs to which eBBlock */
+ char riu; /* after ralloc, the registers in use */
cln = ic->lineno;
}
if (options.iCodeInAsm) {
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
}
/* 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) {
/* 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 */
/* if this is an ipop that means some live
range will have to be assigned again */
int i;
setToNull ((void *) &_G.funcrUsed);
int i;
setToNull ((void *) &_G.funcrUsed);
+ setToNull ((void *) &_G.regAssigned);
setToNull ((void *) &_G.totRegAssigned);
mcs51_ptrRegReq = _G.stackExtend = _G.dataExtend = 0;
mcs51_nRegs = 8;
setToNull ((void *) &_G.totRegAssigned);
mcs51_ptrRegReq = _G.stackExtend = _G.dataExtend = 0;
mcs51_nRegs = 8;
serialRegAssign (ebbs, count);
freeAllRegs ();
serialRegAssign (ebbs, count);
freeAllRegs ();
+ setToNull ((void *) &_G.regAssigned);
+ setToNull ((void *) &_G.totRegAssigned);
fillGaps();
/* if stack was extended then tell the user */
fillGaps();
/* if stack was extended then tell the user */