From 00b035be4979b050840313a5832eb4c9e82a812d Mon Sep 17 00:00:00 2001 From: bernhardheld Date: Fri, 13 Feb 2004 21:47:42 +0000 Subject: [PATCH] * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports which can't handle SDCC_NEWONEBYTEOPS, (geniCodeMultiply): removed conversion from mult to shift for pic14 and pic16 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3194 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 9 ++++++++- src/SDCCicode.c | 11 ++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6968afa7..f5c6f355 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-02-13 Bernhard Held + + * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports + which can't handle SDCC_NEWONEBYTEOPS, + (geniCodeMultiply): removed conversion from mult to shift for pic14 + and pic16 + 2004-02-12 Erik Petrich * src/hc08/gen.h, @@ -23,7 +30,7 @@ promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new, SDCC_OLDONEBYTEOPS selects the old behaviour * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP); - changed again and commented promotion rule (it's still not perfect) + changed again and commented promotion rule * src/SDCCval.c (valDiv): promotion no longer necessary * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte), * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte): diff --git a/src/SDCCicode.c b/src/SDCCicode.c index e65e7d5d..50e86608 100644 --- a/src/SDCCicode.c +++ b/src/SDCCicode.c @@ -1768,8 +1768,7 @@ usualBinaryConversions (operand ** op1, operand ** op2, bool oldOneByteOps = FALSE; static bool saidHello = FALSE; - if ( strcmp (port->target, "pic14") == 0 - || strcmp (port->target, "pic16") == 0) + if (strcmp (port->target, "pic14") == 0) oldOneByteOps = TRUE; if (getenv ("SDCC_NEWONEBYTEOPS")) { @@ -2090,9 +2089,11 @@ geniCodeMultiply (operand * left, operand * right, bool resultIsInt) /* code generated for 1 byte * 1 byte literal = 2 bytes result is more efficient in most cases than 2 bytes result = 2 bytes << literal if port has 1 byte muldiv */ - if (p2 && !IS_FLOAT (letype) && - !((resultIsInt) && (getSize (resType) != getSize (ltype)) && - (port->support.muldiv == 1))) + if (p2 && !IS_FLOAT (letype) + && !((resultIsInt) && (getSize (resType) != getSize (ltype)) + && (port->support.muldiv == 1)) + && strcmp (port->target, "pic14") != 0 /* don't shift for pic */ + && strcmp (port->target, "pic16") != 0) { if ((resultIsInt) && (getSize (resType) != getSize (ltype))) { -- 2.47.2