diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2015-03-10 23:43:50 -0400 |
---|---|---|
committer | Carlos O'Donell <carlos@systemhalted.org> | 2015-03-11 02:48:22 -0400 |
commit | fae1aa8d226ce860124efd67ede03004b19b89e2 (patch) | |
tree | a78b3c667766a495d00e98a21152df1994bec88a /sysdeps/hppa/fpu/fesetenv.c | |
parent | 068a6274556f9f362443648f4fd47525c8cf2dba (diff) | |
download | glibc-fae1aa8d226ce860124efd67ede03004b19b89e2.tar.gz glibc-fae1aa8d226ce860124efd67ede03004b19b89e2.tar.xz glibc-fae1aa8d226ce860124efd67ede03004b19b89e2.zip |
hppa: Fix feholdexcpt and fesetenv (Bug 18110).
The constraints in the inline assembly in feholdexcept and fesetenv are incorrect. The assembly modifies the buffer pointer, but doesn't express that in the constraints. The simple fix is to remove the modification of the buffer pointer which is no longer required by the existing code, and adjust the one constraint that did express the modification of bufptr. The change fixes test-fenv when glibc is compiled with recent gcc.
Diffstat (limited to 'sysdeps/hppa/fpu/fesetenv.c')
-rw-r--r-- | sysdeps/hppa/fpu/fesetenv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c index 5b33ad6102..5de755d3b5 100644 --- a/sysdeps/hppa/fpu/fesetenv.c +++ b/sysdeps/hppa/fpu/fesetenv.c @@ -33,7 +33,7 @@ __fesetenv (const fenv_t *envp) we want to use from the environment specified by the parameter. */ bufptr = temp.buf; __asm__ ( - "fstd,ma %%fr0,8(%1)\n" + "fstd %%fr0,0(%1)\n" : "=m" (temp) : "r" (bufptr) : "%r0"); temp.env.__status_word &= ~(FE_ALL_EXCEPT @@ -54,7 +54,7 @@ __fesetenv (const fenv_t *envp) we take advantage of that to load in reverse order so fr0 is loaded last and T-Bit is enabled. */ __asm__ ( - "fldd,mb -8(%1),%%fr0\n" + "fldd 0(%1),%%fr0\n" : : "m" (temp), "r" (bufptr) : "%r0" ); /* Success. */ |