PATCH: Update sysdeps/x86_64/fpu_control.h

Roland McGrath roland@hack.frob.com
Sun Jun 17 20:12:00 GMT 2012


> +/* Macros for accessing the hardware control word.
> +
> +   Note that the use of these macros is no sufficient anymore with

"not sufficient"

> +   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))

Why *&?  That seems like a no-op.  There should be a comment explaining the
need for volatile.



More information about the Libc-alpha mailing list