]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
*** empty log message ***
authorRichard Stallman <rms@gnu.org>
Thu, 4 Jun 1992 02:12:28 +0000 (02:12 +0000)
committerRichard Stallman <rms@gnu.org>
Thu, 4 Jun 1992 02:12:28 +0000 (02:12 +0000)
From-SVN: r1153

gcc/config/mips/mips.md
gcc/fold-const.c

index ec73c4d713895bbee3fdbab319ac7fba4b34305d..761409a8373021ca15e9cc787be4513f17721a94 100644 (file)
@@ -1220,7 +1220,7 @@ move\\t%0,%z4\\n\\
    and\\t%0,%1,%2
    andi\\t%0,%1,%x2
    lui\\t%3,(%X2)>>16\;and\\t%0,%1,%3
-   li\\t%@,%X2\;and\\t%0,%1,%@"
+   li\\t%3,%X2\;and\\t%0,%1,%3"
   [(set_attr "type"    "arith,arith,multi,multi")
    (set_attr "mode"    "SI")
    (set_attr "length"  "1,1,2,3")
@@ -1336,7 +1336,7 @@ move\\t%0,%z4\\n\\
    or\\t%0,%1,%2
    ori\\t%0,%1,%x2
    lui\\t%3,(%X2)>>16\;or\\t%0,%1,%3
-   li\\t%@,%X2\;or\\t%0,%1,%@"
+   li\\t%3,%X2\;or\\t%0,%1,%3"
   [(set_attr "type"    "arith,arith,multi,multi")
    (set_attr "mode"    "SI")
    (set_attr "length"  "1,1,2,3")
@@ -1452,7 +1452,7 @@ move\\t%0,%z4\\n\\
    xor\\t%0,%1,%2
    xori\\t%0,%1,%x2
    lui\\t%3,(%X2)>>16\;xor\\t%0,%1,%3
-   li\\t%@,%X2\;xor\\t%0,%1,%@"
+   li\\t%3,%X2\;xor\\t%0,%1,%3"
   [(set_attr "type"    "arith,arith,multi,multi")
    (set_attr "mode"    "SI")
    (set_attr "length"  "1,1,2,3")
index ba44e202bc58df4425206937ac3c2df806ee1822..0bc6db3e55ef6c3103756cedf8b91f7e9ae5f619 100644 (file)
@@ -2733,6 +2733,8 @@ fold (expr)
       /* Other kinds of FIX are not handled properly by fold_convert.  */
       /* Two conversions in a row are not needed unless:
         - the intermediate type is narrower than both initial and final, or
+        - the intermediate type and innermost type differ in signedness,
+          and the outermost type is wider than the intermediate, or
         - the initial type is a pointer type and the precisions of the
           intermediate and final types differ, or
         - the final type is a pointer type and the precisions of the 
@@ -2744,6 +2746,14 @@ fold (expr)
              ||
              TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (t, 0)))
              > TYPE_PRECISION (TREE_TYPE (t)))
+         && ! ((TREE_CODE (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 0), 0)))
+                == INTEGER_TYPE)
+               && (TREE_CODE (TREE_TYPE (TREE_OPERAND (t, 0)))
+                   == INTEGER_TYPE)
+               && (TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (t, 0)))
+                   != TREE_UNSIGNED (TREE_OPERAND (TREE_OPERAND (t, 0), 0)))
+               && (TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (t, 0)))
+                   < TYPE_PRECISION (TREE_TYPE (t))))
          && ((TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (t, 0)))
               && (TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (t, 0)))
                   > TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 0), 0)))))