aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-10-30 13:45:42 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-10-30 13:45:42 +0000
commitf16e6077eaecf7ace56ff9f0147c9854f93d77e1 (patch)
tree2563ff48cbf908942137b14e5b91dba9144ee3c9 /gcc/builtins.c
parent4ff7defd046ca231a35c93b4000962b37ccad31c (diff)
downloadgcc-f16e6077eaecf7ace56ff9f0147c9854f93d77e1.zip
gcc-f16e6077eaecf7ace56ff9f0147c9854f93d77e1.tar.gz
gcc-f16e6077eaecf7ace56ff9f0147c9854f93d77e1.tar.bz2
Allow real_format to be passed to more real.h functions
Most real.h routines used machine modes to specify the format of an operation and converted that to a float_format * internally. Some also had alternative versions that accepted a float_format *. In an upcoming patch it seemed more convenient for the callers I was adding to use float_format directly, since the callers need to examine the format themselves for other reasons. This patch therefore replaces the machine_mode arguments with a new class that allows both machine modes and float_format pointers to be used. Tested on x86_64-linux-gnu, arm-linux-gnueabi and aarch64-linux-gnu. gcc/ * real.h (format_helper): New. (real_convert, exact_real_truncate, real_from_string3, real_to_target) (real_from_target, real_nan, real_2expN, real_value_truncate) (significand_size, real_from_string2, exact_real_inverse) (exact_real_inverse, real_powi, real_trunc, real_floor, real_ceil) (real_round, real_isinteger, real_from_integer): Replace machine_mode arguments with format_helper arguments. * real.c (exact_real_inverse, real_from_string2, real_from_string3) (real_from_integer, real_nan, real_2expN, real_convert) (real_value_truncate, exact_real_truncate, real_to_target) (real_from_target, significand_size, real_powi, real_trunc) (real_floor, real_ceil, real_round, real_isinteger): Replace machine_mode arguments with format_helper arguments. (real_to_target_fmt, real_from_target_fmt): Delete. * dfp.h (decimal_real_convert): Replace mode argument with real_format. * dfp.c (decimal_to_binary, decimal_real_convert): Replace mode argument with real_format. * builtins.c (do_real_to_int_conversion): Update type of fn argument. gcc/java/ * jcf-parse.c (get_constant): Use real_from_target rather than real_from_target_fmt. From-SVN: r229581
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index b5ff7ab..11c34e6 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -7273,7 +7273,7 @@ fold_builtin_strlen (location_t loc, tree type, tree arg)
static tree
do_real_to_int_conversion (tree itype, tree arg,
- void (*fn) (REAL_VALUE_TYPE *, machine_mode,
+ void (*fn) (REAL_VALUE_TYPE *, format_helper,
const REAL_VALUE_TYPE *))
{
if (TREE_CODE (arg) != REAL_CST || TREE_OVERFLOW (arg))