This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ports/6506] fesetenv() does not work on hppa with gcc 4.3


------- Additional Comments From carlos at codesourcery dot com  2008-05-11 12:41 -------
Aurel,

Thanks for doing the work in this case. I appreciate your efforts.

@@ -35,7 +35,7 @@ fesetenv (const fenv_t *envp)
   bufptr = temp.buf;
   __asm__ (
 	   "fstd,ma %%fr0,8(%1)\n"
-	   : "=m" (temp), "+r" (bufptr) : : "%r0");
+	   : "=m" (temp) : "r" (bufptr) : "%r0");

This looks correct, and if it prevents the compiler from optimizing away later
stores into the union, then that's good. I don't think this is the bug.

@@ -56,7 +56,7 @@ fesetenv (const fenv_t *envp)
      is loaded last and T-Bit is enabled. */
   __asm__ (
 	   "fldd,mb -8(%1),%%fr0\n"
-	   : "=m" (temp), "+r" (bufptr) : : "%r0" );
+	   : : "m" (temp), "r" (bufptr) : "%r0" );

This is probably the real bug, temp should never have been an output. Removing
the "=" (write-only) constraint and the "+" read/write constraint was the right
thing to do (along with moving them to inputs).

What is the results of running the testsuite after this patch?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


http://sourceware.org/bugzilla/show_bug.cgi?id=6506

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]