about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@bell.net>2014-08-10 09:41:27 -0400
committerMike Frysinger <vapier@gentoo.org>2014-08-10 09:41:27 -0400
commitc2934dc5e03bc0369b76d0b1209aea9323345ff8 (patch)
tree7041e0b7dafd4200635ad63c6125c9aabe92f9e5
parent8e9c9f8f712392fc9c9c3abee93d2ac8bcac6c6e (diff)
downloadglibc-c2934dc5e03bc0369b76d0b1209aea9323345ff8.tar.gz
glibc-c2934dc5e03bc0369b76d0b1209aea9323345ff8.tar.xz
glibc-c2934dc5e03bc0369b76d0b1209aea9323345ff8.zip
hppa: fix bug in floating point exception support
-rw-r--r--ports/sysdeps/hppa/fpu/feholdexcpt.c6
-rw-r--r--ports/sysdeps/hppa/fpu/fesetenv.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/ports/sysdeps/hppa/fpu/feholdexcpt.c b/ports/sysdeps/hppa/fpu/feholdexcpt.c
index b12138720f..2dda85f3be 100644
--- a/ports/sysdeps/hppa/fpu/feholdexcpt.c
+++ b/ports/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 */
@@ -44,7 +44,7 @@ feholdexcept (fenv_t *envp)
      Thus we start bufptr at the end and work backwards */
   bufptr = (unsigned long long *)((unsigned int)(clear.buf) + sizeof(unsigned int)*4);
   __asm__ (
-	   "fldd,mb -8(%0),%%fr0\n"
+	   "fldd 0(%0),%%fr0\n"
 	   : : "r" (bufptr), "m" (clear) : "%r0");
 
   return 0;
diff --git a/ports/sysdeps/hppa/fpu/fesetenv.c b/ports/sysdeps/hppa/fpu/fesetenv.c
index c967bd505c..6ebceef948 100644
--- a/ports/sysdeps/hppa/fpu/fesetenv.c
+++ b/ports/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.  */