This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, hjl/pr14117, created. glibc-2.15-1182-g94f0c0a
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 18 Jun 2012 13:09:03 -0000
- Subject: GNU C Library master sources branch, hjl/pr14117, created. glibc-2.15-1182-g94f0c0a
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr14117 has been created
at 94f0c0aabb8f96746751d15e02d629d666910edc (commit)
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94f0c0aabb8f96746751d15e02d629d666910edc
commit 94f0c0aabb8f96746751d15e02d629d666910edc
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jun 18 06:06:55 2012 -0700
Use __volatile__ to access hardware control word
diff --git a/ChangeLog b/ChangeLog
index 3b7f988..78493aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-06-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14117]
+ * sysdeps/x86_64/fpu_control.h (_FPU_GETCW): Add __volatile__.
+ (_FPU_SETCW): Likewise.
+
2012-06-15 H.J. Lu <hongjiu.lu@intel.com>
[BZ #14117]
diff --git a/sysdeps/x86_64/fpu_control.h b/sysdeps/x86_64/fpu_control.h
index 61bc30e..7e4366d 100644
--- a/sysdeps/x86_64/fpu_control.h
+++ b/sysdeps/x86_64/fpu_control.h
@@ -1,5 +1,5 @@
-/* FPU control word bits. x86-64 version.
- Copyright (C) 1993,1995,1996,1997,1998,2000,2001,2002 Free Software Foundation, Inc.
+/* FPU control word bits. x86 version.
+ Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Olaf Flebbe.
@@ -90,9 +90,13 @@
/* Type of the control word. */
typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
-/* Macros for accessing the hardware control word. */
-#define _FPU_GETCW(cw) __asm__ ("fnstcw %0" : "=m" (*&cw))
-#define _FPU_SETCW(cw) __asm__ ("fldcw %0" : : "m" (*&cw))
+/* Macros for accessing the hardware control word.
+
+ Note that the use of these macros is not sufficient anymore with
+ recent hardware. Some floating point operations are executed in
+ the SSE/SSE2 engines which have their own control and status register. */
+#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))
+#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw))
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources