summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/i386/fpu_control.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-08-23 19:13:46 +0000
committerMike Frysinger <vapier@gentoo.org>2006-08-23 19:13:46 +0000
commit7fb2478092d40e5237115f409968a9762734692b (patch)
tree694e78077f2215dc2269caca7c7285063d21cfaa /libc/sysdeps/linux/i386/fpu_control.h
parent160cae6ad49006f75f393e48ce5516779d7eb8bf (diff)
fixes from psm: disable unsupported __fpu_control and sync with upstream
Diffstat (limited to 'libc/sysdeps/linux/i386/fpu_control.h')
-rw-r--r--libc/sysdeps/linux/i386/fpu_control.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/i386/fpu_control.h b/libc/sysdeps/linux/i386/fpu_control.h
index ed9bf388a..c6cb005d7 100644
--- a/libc/sysdeps/linux/i386/fpu_control.h
+++ b/libc/sysdeps/linux/i386/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word bits. i387 version.
- Copyright (C) 1993,1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1993,1995-1998,2000,2001,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Olaf Flebbe.
@@ -88,11 +88,17 @@
/* 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 no 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))
+
+#if 0
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
+#endif
#endif /* fpu_control.h */