From: bernhardheld Date: Wed, 25 Jun 2003 19:19:03 +0000 (+0000) Subject: * src/mcs51/gen.c (gencjneshort): fixed bug #760345 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=eba7e6b0e55b0da34ba1db2a89e2e26e4f1ff0ad;p=fw%2Fsdcc * src/mcs51/gen.c (gencjneshort): fixed bug #760345 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2714 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 4f971d36..fd21ca5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-06-25 Bernhard Held + + * src/mcs51/gen.c (gencjneshort): fixed bug #760345 + 2003-06-20 Jesus Calvino-Fraga * as/mcs51/aomf51.c: Make sure the size of the last procedure is correct. diff --git a/src/mcs51/gen.c b/src/mcs51/gen.c index 235eeeb2..4430a68f 100644 --- a/src/mcs51/gen.c +++ b/src/mcs51/gen.c @@ -4192,7 +4192,8 @@ gencjneshort (operand * left, operand * right, symbol * lbl) /* if the right side is a literal then anything goes */ if (AOP_TYPE (right) == AOP_LIT && - AOP_TYPE (left) != AOP_DIR) + AOP_TYPE (left) != AOP_DIR && + AOP_TYPE (left) != AOP_IMMD) { while (size--) { @@ -4208,6 +4209,7 @@ gencjneshort (operand * left, operand * right, symbol * lbl) if the left is a pointer register & right is not */ else if (AOP_TYPE (right) == AOP_REG || AOP_TYPE (right) == AOP_DIR || + AOP_TYPE (right) == AOP_LIT || (AOP_TYPE (left) == AOP_DIR && AOP_TYPE (right) == AOP_LIT) || (IS_AOP_PREG (left) && !IS_AOP_PREG (right))) {