]> git.gag.com Git - fw/sdcc/commitdiff
* src/SDCCicode.c (geniCodeMultiply): fixed logic for decision if mul is optimized...
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 9 Mar 2004 21:56:25 +0000 (21:56 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 9 Mar 2004 21:56:25 +0000 (21:56 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3260 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCicode.c

index 055c17629859179d967652025df36b20098de1bf..8358dabef04cd39532565c43f9c9d7a97163d83e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@
        needed for literals of LEFT_OP and '+'
        * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
        introduced RESULT_TYPE_NOPROM
+       (geniCodeMultiply): fixed logic for decision if mul is optimized to 
+       left shift
        * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
        limited promotion to int only for '*'
        * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
index cdd103c000c430f73003c19fed3d35253c6efe5c..3364eecf87dede007a92f8104ad4bd76bb81f318 100644 (file)
@@ -2047,7 +2047,7 @@ geniCodeMultiply (operand * left, operand * right, RESULT_TYPE resultType)
      efficient in most cases than 2 bytes result = 2 bytes << literal
      if port has 1 byte muldiv */
   if (p2 && !IS_FLOAT (letype)
-      && !((resultType != RESULT_TYPE_INT) && (getSize (resType) != getSize (ltype))
+      && !((resultType == RESULT_TYPE_INT) && (getSize (resType) != getSize (ltype))
            && (port->support.muldiv == 1))
       && strcmp (port->target, "pic14") != 0  /* don't shift for pic */
       && strcmp (port->target, "pic16") != 0)