diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2013-05-24 09:40:28 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2013-05-24 09:40:28 +0000 |
commit | df09b22cf9e06a2b1c429161297c7c0ac1d5f194 (patch) | |
tree | 12f4a2f0a23773760691343fad2addd89912572a /gcc/ada/gcc-interface/misc.c | |
parent | 0e24192cc9ae888874557a6caeace67131724c03 (diff) | |
download | gcc-df09b22cf9e06a2b1c429161297c7c0ac1d5f194.zip gcc-df09b22cf9e06a2b1c429161297c7c0ac1d5f194.tar.gz gcc-df09b22cf9e06a2b1c429161297c7c0ac1d5f194.tar.bz2 |
gigi.h (gnat_init_gcc_fp): Declare.
* gcc-interface/gigi.h (gnat_init_gcc_fp): Declare.
* gcc-interface/trans.c (gigi): Call it.
* gcc-interface/misc.c (gnat_init_gcc_fp): New function.
From-SVN: r199287
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
-rw-r--r-- | gcc/ada/gcc-interface/misc.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 2fd2743..7b168df 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2012, Free Software Foundation, Inc. * + * Copyright (C) 1992-2013, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -346,9 +346,7 @@ gnat_init (void) return true; } -/* If we are using the GCC mechanism to process exception handling, we - have to register the personality routine for Ada and to initialize - various language dependent hooks. */ +/* Initialize the GCC support for exception handling. */ void gnat_init_gcc_eh (void) @@ -381,6 +379,28 @@ gnat_init_gcc_eh (void) init_eh (); } +/* Initialize the GCC support for floating-point operations. */ + +void +gnat_init_gcc_fp (void) +{ + /* Disable FP optimizations that ignore the signedness of zero if + S'Signed_Zeros is True, but don't override the user if not. */ + if (Signed_Zeros_On_Target) + flag_signed_zeros = 1; + else if (!global_options_set.x_flag_signed_zeros) + flag_signed_zeros = 0; + + /* Assume that FP operations can trap if S'Machine_Overflow is True, + but don't override the user if not. + + ??? Alpha/VMS enables FP traps without declaring it. */ + if (Machine_Overflows_On_Target || TARGET_ABI_OPEN_VMS) + flag_trapping_math = 1; + else if (!global_options_set.x_flag_trapping_math) + flag_trapping_math = 0; +} + /* Print language-specific items in declaration NODE. */ static void |