From 7fb2478092d40e5237115f409968a9762734692b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 23 Aug 2006 19:13:46 +0000 Subject: fixes from psm: disable unsupported __fpu_control and sync with upstream --- libc/sysdeps/linux/i386/fpu_control.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'libc/sysdeps/linux/i386') 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 */ -- cgit v1.2.3