Although a one byte char array has size==1, it can't be accuse
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 17 Nov 2001 11:18:54 +0000 (11:18 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 17 Nov 2001 11:18:54 +0000 (11:18 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1609 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/ds390/ralloc.c
src/mcs51/ralloc.c
src/pic/ralloc.c
src/z80/ralloc.c

index ca8e0ab3487d08e63fb43e126988692dd81a9220..2a17ebf22bf0470ca119e85d9f61997925b5eb82 100644 (file)
@@ -2157,6 +2157,11 @@ packRegsForAccUse (iCode * ic)
 {
   iCode *uic;
 
+  /* if this is an aggregate, e.g. a one byte char array */
+  if (IS_AGGREGATE(operandType(IC_RESULT(ic)))) {
+    return;
+  }
+
   /* if + or - then it has to be one byte result */
   if ((ic->op == '+' || ic->op == '-')
       && getSize (operandType (IC_RESULT (ic))) > 1)
index df7f665775d98d95faaf7228c35e920680b5dc7c..5d6792266483a51ad383fbf6c9e91c6ee1cf1a9c 100644 (file)
@@ -2056,6 +2056,11 @@ packRegsForAccUse (iCode * ic)
 {
   iCode *uic;
 
+  /* if this is an aggregate, e.g. a one byte char array */
+  if (IS_AGGREGATE(operandType(IC_RESULT(ic)))) {
+    return;
+  }
+
   /* if + or - then it has to be one byte result */
   if ((ic->op == '+' || ic->op == '-')
       && getSize (operandType (IC_RESULT (ic))) > 1)
index 4fc0b827658410779624924f13aee0279c9f7afa..89d6f82f32864ae3487bd0927ed33d121b29508f 100644 (file)
@@ -2560,6 +2560,12 @@ packRegsForAccUse (iCode * ic)
   iCode *uic;
 
   debugLog ("%s\n", __FUNCTION__);
+
+  /* if this is an aggregate, e.g. a one byte char array */
+  if (IS_AGGREGATE(operandType(IC_RESULT(ic)))) {
+    return;
+  }
+
   /* if + or - then it has to be one byte result */
   if ((ic->op == '+' || ic->op == '-')
       && getSize (operandType (IC_RESULT (ic))) > 1)
index 936d8b77f96efb93367ae19cc01074ad7d352e59..71a1e2c46d3ba17d31dc708d913c2c660167c329 100644 (file)
@@ -1892,6 +1892,11 @@ packRegsForAccUse (iCode * ic)
 {
   iCode *uic;
 
+  /* if this is an aggregate, e.g. a one byte char array */
+  if (IS_AGGREGATE(operandType(IC_RESULT(ic)))) {
+    return;
+  }
+
   /* if + or - then it has to be one byte result */
   if ((ic->op == '+' || ic->op == '-')
       && getSize (operandType (IC_RESULT (ic))) > 1)