From 8cb41028fe43dfc2a9c8c2a49deefb769fc1f5e4 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 5 Oct 2015 11:32:25 +0000 Subject: Replace REAL_VALUES_LESS with real_less This patch continues the removal of real-related macros by replacing REAL_VALUES_LESS with real_less. Bootstrapped & regression-tested on x86_64-linux-gnu. Also tested by building one target per CPU directory and checking that there were no new warnings and no changes in testsuite output at -O2. gcc/ada/ * gcc-interface/trans.c (convert_with_check): Use real_less instead of REAL_VALUES_LESS. gcc/ * doc/tm.texi.in (REAL_VALUES_LESS): Delete. * doc/tm.texi: Regenerate. * real.h (real_less): Declare. (REAL_VALUES_LESS): Delete. * real.c (real_less): New function. (real_compare): Use it. * config/m68k/m68k.c (floating_exact_log2): Use real_less instead of REAL_VALUES_LESS. * config/microblaze/microblaze.c (microblaze_const_double_ok): Likewise. * fold-const.c (fold_convert_const_int_from_real): Likewise. * simplify-rtx.c (simplify_const_unary_operation): Likewise. (simplify_const_relational_operation): Likewise. * tree-call-cdce.c (check_pow): Likewise. (gen_conditions_for_pow_cst_base): Likewise. From-SVN: r228475 --- gcc/real.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gcc/real.c') diff --git a/gcc/real.c b/gcc/real.c index d47f32a..49d6739 100644 --- a/gcc/real.c +++ b/gcc/real.c @@ -1086,6 +1086,14 @@ real_equal (const REAL_VALUE_TYPE *op0, const REAL_VALUE_TYPE *op1) return do_compare (op0, op1, -1) == 0; } +/* Return whether OP0 < OP1. */ + +bool +real_less (const REAL_VALUE_TYPE *op0, const REAL_VALUE_TYPE *op1) +{ + return do_compare (op0, op1, 1) < 0; +} + bool real_compare (int icode, const REAL_VALUE_TYPE *op0, const REAL_VALUE_TYPE *op1) @@ -1095,7 +1103,7 @@ real_compare (int icode, const REAL_VALUE_TYPE *op0, switch (code) { case LT_EXPR: - return do_compare (op0, op1, 1) < 0; + return real_less (op0, op1); case LE_EXPR: return do_compare (op0, op1, 1) <= 0; case GT_EXPR: -- cgit v1.1