projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
this DOES cause problems
[fw/sdcc]
/
src
/
mcs51
/
ralloc.c
diff --git
a/src/mcs51/ralloc.c
b/src/mcs51/ralloc.c
index bf3d162f02809cf0c9259391842376c255433a01..546708caa8b2efa8eea5802f7928382d8e2346ec 100644
(file)
--- a/
src/mcs51/ralloc.c
+++ b/
src/mcs51/ralloc.c
@@
-1107,6
+1107,18
@@
serialRegAssign (eBBlock ** ebbs, int count)
/* 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) {
+#if 0
+ 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);
+ }
+ }
+#endif
/* 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 */
@@
-2790,6
+2802,7
@@
mcs51_assignRegisters (eBBlock ** ebbs, int count)
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;
@@
-2810,6
+2823,8
@@
mcs51_assignRegisters (eBBlock ** ebbs, int count)
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 */