summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
14ab888)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5125
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2008-03-30 Philipp Klaus Krause <pkk AT spth.de>
+ * src/z80/ralloc (serialRegAssign, allocReg, tryAllocatingRegPair):
+ Implemented #1921450, changed some Debug messages.
+
2008-03-30 Borut Razem <borut.razem AT siol.net>
* Small Device C Compiler 2.8.0 released
2008-03-30 Borut Razem <borut.razem AT siol.net>
* Small Device C Compiler 2.8.0 released
{
currFunc->regsUsed = bitVectSetBit (currFunc->regsUsed, i);
}
{
currFunc->regsUsed = bitVectSetBit (currFunc->regsUsed, i);
}
- D (D_ALLOC, ("allocReg: alloced %p\n", ®sZ80[i]));
+ D (D_ALLOC, ("allocReg: alloced %s\n", regsZ80[i].name));
currFunc->regsUsed =
bitVectSetBit (currFunc->regsUsed, i + 1);
}
currFunc->regsUsed =
bitVectSetBit (currFunc->regsUsed, i + 1);
}
- D (D_ALLOC, ("tryAllocRegPair: succeded for sym %p\n", sym));
+ D (D_ALLOC, ("tryAllocatingRegPair: succeded for sym %p\n", sym));
- D (D_ALLOC, ("tryAllocRegPair: failed on sym %p\n", sym));
+ D (D_ALLOC, ("tryAllocatingRegPair: failed on sym %p\n", sym));
+ /* Make sure we didn't allocate a register pair with bytes swapped */
+ if(sym->nRegs == 2 && sym->regs[0] == sym->regs[1] + 1 && sym->regs[0] != ®sZ80[2])
+ {
+ freeReg(sym->regs[0]);
+ freeReg(sym->regs[1]);
+ if(!tryAllocatingRegPair(sym))
+ wassertl(0, "Failed to swap register pair bytes back.");
+ }
}
/* if it shares registers with operands make sure
that they are in the same position */
}
/* if it shares registers with operands make sure
that they are in the same position */