]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Reset x87 FPU to 64-bit precision for floating-point I/O on Linux
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 18 Jan 2021 10:19:01 +0000 (11:19 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 6 May 2021 07:51:27 +0000 (03:51 -0400)
gcc/ada/

* init.c (__gnat_init_float): Use full version on Linux too.

gcc/ada/init.c

index 8efec63d6b34fefa7acc51169c5198ae22ad6247..88a62fd8fa557d50717fe7547deb218cdc1ee956 100644 (file)
@@ -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