]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hppa: fix bug in floating point exception support
authorJohn David Anglin <dave.anglin@bell.net>
Sun, 10 Aug 2014 13:41:27 +0000 (09:41 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sun, 10 Aug 2014 13:41:27 +0000 (09:41 -0400)
ports/sysdeps/hppa/fpu/feholdexcpt.c
ports/sysdeps/hppa/fpu/fesetenv.c

index b12138720f5e4622aa1a0fe6a5e2649fe3db8f4a..2dda85f3be45b3a1d08366e03cb512b9f4089682 100644 (file)
@@ -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;
index c967bd505c54c0295c0f4c2be358598647ea547b..6ebceef94890b3f05e0c61794632efce6c40e6f5 100644 (file)
@@ -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.  */