/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* the rights to redistribute these changes.
*/
-/*
- */
-
#ifndef _I386_FPU_H_
#define _I386_FPU_H_
#define fldcw(control) \
__asm__ volatile("fldcw %0" : : "m" (*(unsigned short *) &(control)) )
-extern unsigned short fnstsw(void);
-
-extern __inline__ unsigned short fnstsw(void)
+static inline unsigned short
+fnstsw(void)
{
unsigned short status;
__asm__ volatile("fnstsw %0" : "=ma" (status));
clear_ts();
/* registers are in FPU - save to memory */
ifps->fp_valid = TRUE;
+
if (!thread_is_64bit(thread) || is_saved_state32(thread->machine.pcb->iss)) {
/* save the compatibility/legacy mode XMM+x87 state */
fxsave(&ifps->fx_save_state);