From 2fec3f8b1b41196a652b709991aeafa3ae010fea Mon Sep 17 00:00:00 2001 From: epetrich Date: Thu, 23 Oct 2003 03:44:44 +0000 Subject: [PATCH] * src/SDCCmain.c, * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work) * src/mcs51/gen.c (gencjneshort), * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand more efficient (per Scott Bronson's suggestion) git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2958 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- sdccconf_in.h | 1 + src/SDCCmain.c | 4 +++- src/ds390/gen.c | 3 +++ src/mcs51/gen.c | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sdccconf_in.h b/sdccconf_in.h index a34379dd..aa501882 100644 --- a/sdccconf_in.h +++ b/sdccconf_in.h @@ -68,6 +68,7 @@ #undef OPT_DISABLE_PIC #undef OPT_DISABLE_PIC16 #undef OPT_DISABLE_XA51 +#undef OPT_DISABLE_HC08 #undef OPT_ENABLE_LIBGC diff --git a/src/SDCCmain.c b/src/SDCCmain.c index 2002576f..b137bb2e 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -303,8 +303,10 @@ static PORT *_ports[] = #endif #if !OPT_DISABLE_DS400 &ds400_port, -#endif +#endif +#if !OPT_DISABLE_HC08 &hc08_port, +#endif }; #define NUM_PORTS (sizeof(_ports)/sizeof(_ports[0])) diff --git a/src/ds390/gen.c b/src/ds390/gen.c index a6b67024..c9af3592 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -5660,6 +5660,7 @@ gencjneshort (operand * left, operand * right, symbol * lbl) if the right is in a pointer register and left is not */ if ((AOP_TYPE (left) == AOP_LIT) || + (AOP_TYPE (left) == AOP_IMMD) || (IS_AOP_PREG (right) && !IS_AOP_PREG (left))) { operand *t = right; @@ -5698,6 +5699,8 @@ 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 (right) == AOP_IMMD || (AOP_TYPE (left) == AOP_DIR && AOP_TYPE (right) == AOP_LIT) || (IS_AOP_PREG (left) && !IS_AOP_PREG (right))) { diff --git a/src/mcs51/gen.c b/src/mcs51/gen.c index 34c178c0..7f254ef7 100644 --- a/src/mcs51/gen.c +++ b/src/mcs51/gen.c @@ -4263,12 +4263,14 @@ gencjneshort (operand * left, operand * right, symbol * lbl) if the right is in a pointer register and left is not */ if ((AOP_TYPE (left) == AOP_LIT) || + (AOP_TYPE (left) == AOP_IMMD) || (IS_AOP_PREG (right) && !IS_AOP_PREG (left))) { operand *t = right; right = left; left = t; } + if (AOP_TYPE (right) == AOP_LIT) lit = (unsigned long) floatFromVal (AOP (right)->aopu.aop_lit); @@ -4292,6 +4294,7 @@ gencjneshort (operand * left, operand * right, symbol * lbl) else if (AOP_TYPE (right) == AOP_REG || AOP_TYPE (right) == AOP_DIR || AOP_TYPE (right) == AOP_LIT || + AOP_TYPE (right) == AOP_IMMD || (AOP_TYPE (left) == AOP_DIR && AOP_TYPE (right) == AOP_LIT) || (IS_AOP_PREG (left) && !IS_AOP_PREG (right))) { -- 2.30.2