aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/misc.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 11:22:39 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 11:22:39 +0200
commit2422831252036d2821984173a7a22aac5518ef5c (patch)
tree782a77c0def56618c442f8f456b1bf1a0de3729c /gcc/ada/gcc-interface/misc.c
parentd77cfab2813d0921344f74c219ec3e4a173aa3f1 (diff)
downloadgcc-2422831252036d2821984173a7a22aac5518ef5c.zip
gcc-2422831252036d2821984173a7a22aac5518ef5c.tar.gz
gcc-2422831252036d2821984173a7a22aac5518ef5c.tar.bz2
[multiple changes]
2014-08-01 Arnaud Charlet <charlet@adacore.com> * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove xgnatugn.adb and ug_words. 2014-08-01 Eric Botcazou <ebotcazou@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): Check whether expansion can be avoid for Machine, Model and Rounding. (Is_Inline_Floating_Point_Attribute): Return true for Machine & Model, as well as Rounding if wrapped in a conversion to an integer type. * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well. * gcc-interface/gigi.h (fp_arith_may_widen): Declare. * gcc-interface/utils.c (fp_arith_may_widen): New global variable. * gcc-interface/misc.c (enumerate_modes): Compute it. * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete. (lvalue_required_for_attribute_p): Deal with Descriptor_Size, Machine and Model. (Attribute_to_gnu) <Attr_Model>: New case. <Attr_Machine>): Likewise. (convert_with_check): Test fp_arith_may_widen variable. 2014-08-01 Pascal Obry <obry@adacore.com> * adaint.h (GNAT_FOPEN): New definition for Windows. (GNAT_OPEN): Likewise. (GNAT_STAT): Likewise. (GNAT_FSTAT): Likewise. (GNAT_LSTAT): Likewise. (GNAT_STRUCT_STAT): Likewise. * adaint.c (__gnat_stat): Fix computation of file size for Windows. 2014-08-01 Vincent Celier <celier@adacore.com> * Makefile.rtl: Minor comment update. 2014-08-01 Vincent Celier <celier@adacore.com> * Make-generated.in: Remove dependencies for vms-help. From-SVN: r213429
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
-rw-r--r--gcc/ada/gcc-interface/misc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index 3d1ea17..9a07de0 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -717,6 +717,9 @@ enumerate_modes (void (*f) (const char *, int, int, int, int, int, int, int))
= { "float", "double", "long double" };
int iloop;
+ /* We are going to compute it below. */
+ fp_arith_may_widen = false;
+
for (iloop = 0; iloop < NUM_MACHINE_MODES; iloop++)
{
enum machine_mode i = (enum machine_mode) iloop;
@@ -766,6 +769,15 @@ enumerate_modes (void (*f) (const char *, int, int, int, int, int, int, int))
if (!fmt)
continue;
+ /* Be conservative and consider that floating-point arithmetics may
+ use wider intermediate results as soon as there is an extended
+ Motorola or Intel mode supported by the machine. */
+ if (fmt == &ieee_extended_motorola_format
+ || fmt == &ieee_extended_intel_96_format
+ || fmt == &ieee_extended_intel_96_round_53_format
+ || fmt == &ieee_extended_intel_128_format)
+ fp_arith_may_widen = true;
+
if (fmt->b == 2)
digs = (fmt->p - 1) * 1233 / 4096; /* scale by log (2) */