+2009-02-18 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Use
+ .machine push; .machine "power6" and .machine pop around mtfsf
+ insns outside of _ARCH_PWR6 define.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S:
+ Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S:
+ Likewise.
+ * sysdeps/powerpc/fpu/tst-setcontext-fpscr.c (_SET_DI_FPSCR): Likewise.
+ * sysdeps/powerpc/fpu/fenv_libc.h (fesetenv_register,
+ relax_fenv_state): Likewise.
+
2009-03-08 Ulrich Drepper <drepper@redhat.com>
* stdlib/Makefile (routines): Add quick_exit, at_quick_exit, and
/* Internal libc stuff for floating point environment routines.
- Copyright (C) 1997, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2006, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
do { \
double d = (env); \
if(GLRO(dl_hwcap) & PPC_FEATURE_HAS_DFP) \
- asm volatile ("mtfsf 0xff,%0,1,0" : : "f" (d)); \
+ asm volatile (".machine push; " \
+ ".machine \"power6\"; " \
+ "mtfsf 0xff,%0,1,0; " \
+ ".machine pop" : : "f" (d)); \
else \
asm volatile ("mtfsf 0xff,%0" : : "f" (d)); \
} while(0)
functions. */
#define relax_fenv_state() \
do { \
- if(GLRO(dl_hwcap) & PPC_FEATURE_HAS_DFP) \
- asm ("mtfsfi 7,0,1"); \
+ if (GLRO(dl_hwcap) & PPC_FEATURE_HAS_DFP) \
+ asm (".machine push; .machine \"power6\"; " \
+ "mtfsfi 7,0,1; .machine pop"); \
asm ("mtfsfi 7,0"); \
} while(0)
tmp __attribute__ ((__aligned__(8))); \
tmp.fpscr = __fpscr; \
/* Set the entire 64-bit FPSCR. */ \
- __asm__ ("lfd%U0 0,%0; mtfsf 255,0,1,0" : : "m" (tmp.d) : "fr0"); \
+ __asm__ ("lfd%U0 0,%0; " \
+ ".machine push; " \
+ ".machine \"power6\"; " \
+ "mtfsf 255,0,1,0; " \
+ ".machine pop" : : "m" (tmp.d) : "fr0"); \
tmp.d = 0; \
__asm__("lfd%U0 0,%0" : : "m" (tmp.d) : "fr0"); \
}