* src/pic/pcode.c (InitReuseRegs): allocate registers with pseudo
indices >= 0x1000 to disambiguate them from fixed regs __at(addr),
fixes #
1550049
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4354
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2006-09-03 Raphael Neider <rneider AT web.de>
+
+ * src/pic/ralloc.c,
+ * src/pic/pcode.c (InitReuseRegs): allocate registers with pseudo
+ indices >= 0x1000 to disambiguate them from fixed regs __at(addr),
+ fixes #1550049
+
2006-09-01 Borut Razem <borut.razem AT siol.net>
* sim/ucsim/cmd.src/cmdutil.cc: #include <sys/time.h> and <unistd.h>
void InitReuseReg(void)
{
/* Find end of statically allocated variables for start idx */
- unsigned maxIdx = 0x20; /* Start from begining of GPR. Note may not be 0x20 on some PICs */
+ /* Start from begining of GPR. Note may not be 0x20 on some PICs */
+ /* XXX: Avoid clashes with fixed registers, start late. */
+ unsigned maxIdx = 0x1000;
regs *r;
for (r = setFirstItem(dynDirectRegs); r; r = setNextItem(dynDirectRegs)) {
if (r->type != REG_SFR) {
static hTab *dynDirectRegNames= NULL;
// static hTab *regHash = NULL; /* a hash table containing ALL registers */
-static int dynrIdx=0x20;
-static int rDirectIdx=0;
+static int dynrIdx = 0x1000;
+static int rDirectIdx = 0x5000;
int pic14_nRegs = 128; // = sizeof (regspic14) / sizeof (regs);