OSDN Git Service

* optabs.c (prepare_cmp_insn): Use correct biasing for fixed-point
authorjules <jules@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Aug 2011 11:46:27 +0000 (11:46 +0000)
committerjules <jules@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Aug 2011 11:46:27 +0000 (11:46 +0000)
comparison helpers.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177015 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/optabs.c

index 8bb0898..da6e982 100644 (file)
@@ -1,3 +1,8 @@
+2011-08-01  Julian Brown  <julian@codesourcery.com>
+
+       * optabs.c (prepare_cmp_insn): Use correct biasing for fixed-point
+       comparison helpers.
+
 2011-07-31  Richard Henderson  <rth@redhat.com>
 
        * config/h8300/crti.asm: Add flags to .section directive.
index 12717b6..99228f3 100644 (file)
@@ -3959,11 +3959,13 @@ prepare_cmp_insn (rtx x, rtx y, enum rtx_code comparison, rtx size,
         result against 1 in the biased case, and zero in the unbiased
         case. For unsigned comparisons always compare against 1 after
         biasing the unbiased result by adding 1. This gives us a way to
-        represent LTU. */
+        represent LTU.
+        The comparisons in the fixed-point helper library are always
+        biased.  */
       x = result;
       y = const1_rtx;
 
-      if (!TARGET_LIB_INT_CMP_BIASED)
+      if (!TARGET_LIB_INT_CMP_BIASED && !ALL_FIXED_POINT_MODE_P (mode))
        {
          if (unsignedp)
            x = plus_constant (result, 1);