Fixed a loop invariant bug & a casting bug
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 14 Oct 2000 20:08:39 +0000 (20:08 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 14 Oct 2000 20:08:39 +0000 (20:08 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@462 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/avr/ralloc.c
src/ds390/ralloc.c
src/mcs51/ralloc.c

index dc2404f7277f683dbe134a44eec329b1274ed551..c039267511bdf1045d597f060146c190a158aa85 100644 (file)
@@ -2141,7 +2141,8 @@ static void packRegisters (eBBlock *ebp)
            link *toType = operandType(IC_LEFT(ic));
 
            if (IS_INTEGRAL(fromType) && IS_INTEGRAL(toType) &&
-               getSize(fromType) != getSize(toType) ) {
+               getSize(fromType) != getSize(toType) &&
+               SPEC_USIGN(fromType) == SPEC_USIGN(toType)) {
 
                iCode *dic = packRegsForOneuse(ic,IC_RIGHT(ic),ebp);
                if (dic) {
index 7555de4ed2310434c57650fd49afae8f7418a161..9d12c973d1c0609d175dc38cb595f9352daa03de 100644 (file)
@@ -2191,7 +2191,8 @@ static void packRegisters (eBBlock *ebp)
            link *toType = operandType(IC_LEFT(ic));
 
            if (IS_INTEGRAL(fromType) && IS_INTEGRAL(toType) &&
-               getSize(fromType) != getSize(toType) ) {
+               getSize(fromType) != getSize(toType) && 
+               SPEC_USIGN(fromType) == SPEC_USIGN(toType)) {
 
                iCode *dic = packRegsForOneuse(ic,IC_RIGHT(ic),ebp);
                if (dic) {
index 2a3726c340fe7a6fd705f54add137b535b9f6c08..cf088764cb47bace9002844f69fe6ec854d8b9c9 100644 (file)
@@ -2190,7 +2190,8 @@ static void packRegisters (eBBlock *ebp)
            link *toType = operandType(IC_LEFT(ic));
 
            if (IS_INTEGRAL(fromType) && IS_INTEGRAL(toType) &&
-               getSize(fromType) != getSize(toType) ) {
+               getSize(fromType) != getSize(toType)  &&
+               SPEC_USIGN(fromType) == SPEC_USIGN(toType)) {
 
                iCode *dic = packRegsForOneuse(ic,IC_RIGHT(ic),ebp);
                if (dic) {