diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2021-01-18 11:19:01 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-06 03:51:27 -0400 |
commit | 1bc178bb6c6f5c959c9fb0d929734c08ad5aa1d5 (patch) | |
tree | 203dc953d4fed02ea462c875b5efca1a792dbf9e /gcc/ada/init.c | |
parent | 799dfd944ab88e1a32e537fcef7307634c376907 (diff) | |
download | gcc-1bc178bb6c6f5c959c9fb0d929734c08ad5aa1d5.zip gcc-1bc178bb6c6f5c959c9fb0d929734c08ad5aa1d5.tar.gz gcc-1bc178bb6c6f5c959c9fb0d929734c08ad5aa1d5.tar.bz2 |
[Ada] Reset x87 FPU to 64-bit precision for floating-point I/O on Linux
gcc/ada/
* init.c (__gnat_init_float): Use full version on Linux too.
Diffstat (limited to 'gcc/ada/init.c')
-rw-r--r-- | gcc/ada/init.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/gcc/ada/init.c b/gcc/ada/init.c index 8efec63..88a62fd 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -2749,11 +2749,7 @@ __gnat_install_handler (void) /* __gnat_init_float */ /*********************/ -/* This routine is called as each process thread is created, for possible - initialization of the FP processor. This version is used under INTERIX - and WIN32. */ - -#if defined (_WIN32) || defined (__INTERIX) \ +#if defined (_WIN32) || defined (__INTERIX) || defined (__linux__) \ || defined (__Lynx__) || defined(__NetBSD__) || defined(__FreeBSD__) \ || defined (__OpenBSD__) || defined (__DragonFly__) || defined(__QNX__) @@ -2763,13 +2759,10 @@ void __gnat_init_float (void) { #if defined (__i386__) || defined (__x86_64__) - - /* This is used to properly initialize the FPU on an x86 for each - process thread. */ - + /* This is used to properly initialize the FPU to 64-bit precision on an x86 + for each process thread and also for floating-point I/O. */ asm ("finit"); - -#endif /* Defined __i386__ */ +#endif } #endif |