aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Brown <julian@codesourcery.com>2011-08-01 11:46:27 +0000
committerJulian Brown <jules@gcc.gnu.org>2011-08-01 11:46:27 +0000
commitf64398b59c1aaeeae30a5cbd65ba2cbdc69b4dc8 (patch)
treecf7132d9195abf40c4caff6c21af115100b1baf3
parent857ade1b5ac9928145759c763059b7eda3d6739a (diff)
downloadgcc-f64398b59c1aaeeae30a5cbd65ba2cbdc69b4dc8.zip
gcc-f64398b59c1aaeeae30a5cbd65ba2cbdc69b4dc8.tar.gz
gcc-f64398b59c1aaeeae30a5cbd65ba2cbdc69b4dc8.tar.bz2
optabs.c (prepare_cmp_insn): Use correct biasing for fixed-point comparison helpers.
* optabs.c (prepare_cmp_insn): Use correct biasing for fixed-point comparison helpers. From-SVN: r177015
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/optabs.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8bb0898..da6e982 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 12717b6..99228f3 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -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);