[Glibc-bsd-commits] r5520 - trunk/glibc-ports/fbtl

ps-guest at alioth.debian.org ps-guest at alioth.debian.org
Fri Sep 12 13:17:18 UTC 2014


Author: ps-guest
Date: 2014-09-12 13:17:18 +0000 (Fri, 12 Sep 2014)
New Revision: 5520

Modified:
   trunk/glibc-ports/fbtl/descr.h
   trunk/glibc-ports/fbtl/pthread_create.c
Log:
initialize x87 control word during thread start


Modified: trunk/glibc-ports/fbtl/descr.h
===================================================================
--- trunk/glibc-ports/fbtl/descr.h	2014-09-11 00:31:15 UTC (rev 5519)
+++ trunk/glibc-ports/fbtl/descr.h	2014-09-12 13:17:18 UTC (rev 5520)
@@ -38,6 +38,7 @@
 #define __need_res_state
 #include <resolv.h>
 #include <kernel-features.h>
+#include <fpu_control.h>
 
 #ifndef TCB_ALIGNMENT
 # define TCB_ALIGNMENT	sizeof (double)
@@ -395,6 +396,9 @@
   /* Resolver state.  */
   struct __res_state res;
 
+  /* FPU initial control word */
+  fpu_control_t fpu_control_init;
+  
   /* This member must be last.  */
   char end_padding[];
 

Modified: trunk/glibc-ports/fbtl/pthread_create.c
===================================================================
--- trunk/glibc-ports/fbtl/pthread_create.c	2014-09-11 00:31:15 UTC (rev 5519)
+++ trunk/glibc-ports/fbtl/pthread_create.c	2014-09-12 13:17:18 UTC (rev 5520)
@@ -239,6 +239,10 @@
   THREAD_SETMEM (pd, cpuclock_offset, now);
 #endif
 
+#if 1
+  _FPU_SETCW(pd->fpu_control_init);
+#endif
+
   /* Initialize resolver state pointer.  */
   __resp = &pd->res;
 
@@ -530,6 +534,10 @@
   pd->schedpolicy = self->schedpolicy;
   pd->schedparam = self->schedparam;
 
+#if 1
+  _FPU_GETCW(pd->fpu_control_init); 
+#endif
+  
   /* Copy the stack guard canary.  */
 #ifdef THREAD_COPY_STACK_GUARD
   THREAD_COPY_STACK_GUARD (pd);




More information about the Glibc-bsd-commits mailing list