diff options
author | Ryan S. Arnold <rsa@us.ibm.com> | 2009-07-24 10:41:04 -0500 |
---|---|---|
committer | Ryan Arnold <ryanarn@etna.rchland.ibm.com> | 2009-07-24 15:10:55 -0500 |
commit | 3385d53cf549e798489e03522344e318d3e684f7 (patch) | |
tree | 0ce7457ccb52b399108c549033e37f89c57ba72f | |
parent | e52b0ccf5d1e31f154572c0b7ccaf0dd1e592b50 (diff) | |
download | glibc-3385d53cf549e798489e03522344e318d3e684f7.zip glibc-3385d53cf549e798489e03522344e318d3e684f7.tar.gz glibc-3385d53cf549e798489e03522344e318d3e684f7.tar.bz2 |
Added .machine push; .machine "power6"; .machine pop in macros.
commit 1454da21955742494232aa8b34c5e238263ad37a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 10 04:47:30 2009 +0000
* 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.
-rw-r--r-- | sysdeps/powerpc/fpu/fenv_libc.h | 12 | ||||
-rw-r--r-- | sysdeps/powerpc/fpu/tst-setcontext-fpscr.c | 6 |
2 files changed, 13 insertions, 5 deletions
diff --git a/sysdeps/powerpc/fpu/fenv_libc.h b/sysdeps/powerpc/fpu/fenv_libc.h index c70f851..0a4a57d 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) diff --git a/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c b/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c index a15fe86..e75a7f1 100644 --- a/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c +++ b/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c @@ -111,7 +111,11 @@ typedef unsigned int si_fpscr_t __attribute__ ((__mode__ (__SI__))); 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"); \ } |