aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
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/java
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/java')
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/jcf-parse.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 33722e2..15cd23c 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ * jcf-parse.c (get_constant): Use real_from_target rather than
+ real_from_target_fmt.
+
2015-10-29 Andrew MacLeod <amacleod@redhat.com>
* boehm.c: Reorder #include's and remove duplicates.
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index 00d36a3..792fdbf 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -1058,7 +1058,7 @@ get_constant (JCF *jcf, int index)
long buf = num;
REAL_VALUE_TYPE d;
- real_from_target_fmt (&d, &buf, &ieee_single_format);
+ real_from_target (&d, &buf, &ieee_single_format);
value = build_real (float_type_node, d);
break;
}
@@ -1076,7 +1076,7 @@ get_constant (JCF *jcf, int index)
else
buf[0] = lo, buf[1] = hi;
- real_from_target_fmt (&d, buf, &ieee_double_format);
+ real_from_target (&d, buf, &ieee_double_format);
value = build_real (double_type_node, d);
break;
}