* src/pic/ralloc.c,
authortecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 3 Sep 2006 14:39:49 +0000 (14:39 +0000)
committertecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 3 Sep 2006 14:39:49 +0000 (14:39 +0000)
* 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

ChangeLog
src/pic/pcode.c
src/pic/ralloc.c

index f94884a739dd1b90b620a8bbd07016772ead4013..d0a56e0b1180c7a16b5c0002f89459425c959e7c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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>
index 8af55b1b10c6e8eb5550476fd0d87c554dae5ccc..d29b62e42b5486f36b3ed652388481308783a66b 100644 (file)
@@ -5654,7 +5654,9 @@ DEFSETFUNC (resetrIdx)
 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) {
index d8b5d8df9a6a0f979f3301a8f847e06f1f39f690..a73247fd161fef1266f822a5e722d948b613e5e2 100644 (file)
@@ -82,8 +82,8 @@ set *dynInternalRegs=NULL;
 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);