summaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/misc.c
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-01 09:22:39 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-01 09:22:39 +0000
commitb6f6bb02a7f7ca8201854889207bcecef3c4221a (patch)
tree782a77c0def56618c442f8f456b1bf1a0de3729c /gcc/ada/gcc-interface/misc.c
parentcdd4f74f23a14c4e2dedc99e9aba4b4174af28da (diff)
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213429 138bc75d-0d04-0410-961f-82ee72b054a4
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 3d1ea17a8f4c..9a07de0ad09f 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) */