Commit df09b22c by Eric Botcazou Committed by Eric Botcazou

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
parent 0e24192c
2013-05-24 Eric Botcazou <ebotcazou@adacore.com> 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
* 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.
2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (enum inline_status_t): New type. * gcc-interface/gigi.h (enum inline_status_t): New type.
(create_subprog_decl): Adjust prototype. (create_subprog_decl): Adjust prototype.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Adjust * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Adjust
......
...@@ -502,7 +502,13 @@ extern tree get_block_jmpbuf_decl (void); ...@@ -502,7 +502,13 @@ extern tree get_block_jmpbuf_decl (void);
for location information and flag propagation. */ for location information and flag propagation. */
extern void gnat_pushdecl (tree decl, Node_Id gnat_node); extern void gnat_pushdecl (tree decl, Node_Id gnat_node);
/* Initialize the GCC support for exception handling. */
extern void gnat_init_gcc_eh (void); extern void gnat_init_gcc_eh (void);
/* Initialize the GCC support for floating-point operations. */
extern void gnat_init_gcc_fp (void);
/* Install the builtin functions we might need. */
extern void gnat_install_builtins (void); extern void gnat_install_builtins (void);
/* Return an integer type with the number of bits of precision given by /* Return an integer type with the number of bits of precision given by
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* * * *
* C Implementation File * * 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 * * 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- * * terms of the GNU General Public License as published by the Free Soft- *
...@@ -346,9 +346,7 @@ gnat_init (void) ...@@ -346,9 +346,7 @@ gnat_init (void)
return true; return true;
} }
/* If we are using the GCC mechanism to process exception handling, we /* Initialize the GCC support for exception handling. */
have to register the personality routine for Ada and to initialize
various language dependent hooks. */
void void
gnat_init_gcc_eh (void) gnat_init_gcc_eh (void)
...@@ -381,6 +379,28 @@ gnat_init_gcc_eh (void) ...@@ -381,6 +379,28 @@ gnat_init_gcc_eh (void)
init_eh (); 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. */ /* Print language-specific items in declaration NODE. */
static void static void
......
...@@ -677,6 +677,9 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED, ...@@ -677,6 +677,9 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
if (Exception_Mechanism == Back_End_Exceptions) if (Exception_Mechanism == Back_End_Exceptions)
gnat_init_gcc_eh (); gnat_init_gcc_eh ();
/* Initialize the GCC support for FP operations. */
gnat_init_gcc_fp ();
/* Now translate the compilation unit proper. */ /* Now translate the compilation unit proper. */
Compilation_Unit_to_gnu (gnat_root); Compilation_Unit_to_gnu (gnat_root);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment