summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/fpu/fenv_libc.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-03-10 19:34:45 +0000
committerJakub Jelinek <jakub@redhat.com>2009-03-10 19:34:45 +0000
commitd4c583b4466962a9d9d4ca54ab6108dc7b42cdcc (patch)
tree0c0ae0f76861d31a4fa7e351d88b6539364cf9e8 /sysdeps/powerpc/fpu/fenv_libc.h
parent5c1d419918b3637170da9a5592049048aaf0ee49 (diff)
Updated to fedora-glibc-20090310T1925cvs/fedora-glibc-2_9_90-10
Diffstat (limited to 'sysdeps/powerpc/fpu/fenv_libc.h')
-rw-r--r--sysdeps/powerpc/fpu/fenv_libc.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/sysdeps/powerpc/fpu/fenv_libc.h b/sysdeps/powerpc/fpu/fenv_libc.h
index c70f85130d..0a4a57da68 100644
--- a/sysdeps/powerpc/fpu/fenv_libc.h
+++ b/sysdeps/powerpc/fpu/fenv_libc.h
@@ -1,5 +1,5 @@
/* 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
@@ -39,7 +39,10 @@ libm_hidden_proto (__fe_nomask_env)
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)
@@ -52,8 +55,9 @@ libm_hidden_proto (__fe_nomask_env)
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)