summaryrefslogtreecommitdiff
path: root/sysdeps/hppa/fpu
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/hppa/fpu')
-rw-r--r--sysdeps/hppa/fpu/feholdexcpt.c10
-rw-r--r--sysdeps/hppa/fpu/fesetenv.c4
2 files changed, 6 insertions, 8 deletions
diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c
index 94eba37441..1db2775cd6 100644
--- a/sysdeps/hppa/fpu/feholdexcpt.c
+++ b/sysdeps/hppa/fpu/feholdexcpt.c
@@ -29,8 +29,8 @@ __feholdexcept (fenv_t *envp)
/* Store the environment. */
bufptr = clear.buf;
__asm__ (
- "fstd,ma %%fr0,8(%1)\n"
- : "=m" (clear), "+r" (bufptr) : : "%r0");
+ "fstd %%fr0,0(%1)\n"
+ : "=m" (clear) : "r" (bufptr) : "%r0");
memcpy (envp, &clear.env, sizeof (fenv_t));
/* Clear exception queues */
@@ -40,11 +40,9 @@ __feholdexcept (fenv_t *envp)
/* Now clear all flags */
clear.env.__status_word &= ~(FE_ALL_EXCEPT << 27);
- /* Load the new environment. Note: fr0 must load last to enable T-bit
- Thus we start bufptr at the end and work backwards */
- bufptr = (unsigned long long *)((unsigned int)(clear.buf) + sizeof(unsigned int)*4);
+ /* Load the new environment. Note: fr0 must load last to enable T-bit. */
__asm__ (
- "fldd,mb -8(%0),%%fr0\n"
+ "fldd 0(%0),%%fr0\n"
: : "r" (bufptr), "m" (clear) : "%r0");
return 0;
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. */