catched symbol abuse
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 26 Mar 2003 09:32:28 +0000 (09:32 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 26 Mar 2003 09:32:28 +0000 (09:32 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2418 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/ds390/gen.c
src/mcs51/gen.c

index 845eb11c58024badc0701d64288fed2452350455..b433a1599401a1117f3a72236a792515052a837d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-26    <johan@balder>
+
+       * src/mcs51/gen.c (saveRegisters): catched symbol abuse
+       * src/ds390/gen.c (saveRegisters): catched symbol abuse
+       * src/SDCCast.c (decorateType): fixed " -v < 3"
+
 2003-03-23  Bernhard Held <bernhard@bernhardheld.de>
 
        * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
index aba719c5b22627fee810ec1d9d4a0b8392bd16c5..d472def121beccea35767220bdd208722ab912a6 100644 (file)
@@ -2034,11 +2034,14 @@ saveRegisters (iCode * lic)
 
   /* if the registers have been saved already then
      do nothing */
-  if (ic->regsSaved || IFFUNC_ISNAKED(OP_SYM_TYPE(IC_LEFT(ic)))) return ;
+  if (ic->regsSaved || 
+      (IS_SYMOP(IC_LEFT(ic)) && IFFUNC_ISNAKED(OP_SYM_TYPE(IC_LEFT(ic)))))
+    return ;
 
   /* special case if DPTR alive across a function call then must save it 
      even though callee saves */
-  if (IFFUNC_CALLEESAVES(OP_SYMBOL (IC_LEFT (ic))->type)) {
+  if (IS_SYMOP(IC_LEFT(ic)) &&
+      IFFUNC_CALLEESAVES(OP_SYMBOL (IC_LEFT (ic))->type)) {
       int i;
       rsave = newBitVect(ic->rMask->size);
       for (i = DPL_IDX ; i <= B_IDX ; i++ ) {
index 5c7693f79505116e985aa7b5f67e03e909bf1ded..0dbce03e4faf9c3df3f406c97f7eb92a96305232 100644 (file)
@@ -1548,10 +1548,13 @@ saveRegisters (iCode * lic)
 
   /* if the registers have been saved already or don't need to be then
      do nothing */
-  if (ic->regsSaved || IFFUNC_CALLEESAVES(OP_SYMBOL(IC_LEFT(ic))->type) ||
-      IFFUNC_ISNAKED(OP_SYM_TYPE(IC_LEFT (ic))))
+  if (ic->regsSaved)
     return;
-
+  if (IS_SYMOP(IC_LEFT(ic)) &&
+      (IFFUNC_CALLEESAVES(OP_SYMBOL(IC_LEFT(ic))->type) ||
+       IFFUNC_ISNAKED(OP_SYM_TYPE(IC_LEFT (ic)))))
+    return;
+  
   /* safe the registers in use at this time but skip the
      ones for the result */
   rsave = bitVectCplAnd (bitVectCopy (ic->rMask),