]> git.gag.com Git - fw/sdcc/commitdiff
* src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports which can't...
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 13 Feb 2004 21:47:42 +0000 (21:47 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 13 Feb 2004 21:47:42 +0000 (21:47 +0000)
(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
src/SDCCicode.c

index 6968afa7584b439cfdbe1ad27e0c940052d34889..f5c6f3555d477d23b9ed66d63a258be973f3f481 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
+
+       * 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 <epetrich AT ivorytower.norman.ok.us>
 
        * 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):
index e65e7d5de73728ddbaf8bc75bd73b3a0d221f496..50e86608266fb19fe192faf1671198fbd4ae1bce 100644 (file)
@@ -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)))
        {