This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug ports/6506] fesetenv() does not work on hppa with gcc 4.3
- From: "aurelien at aurel32 dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 11 May 2008 13:05:18 -0000
- Subject: [Bug ports/6506] fesetenv() does not work on hppa with gcc 4.3
- References: <20080510181443.6506.aurelien@aurel32.net>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From aurelien at aurel32 dot net 2008-05-11 13:05 -------
(In reply to comment #2)
> 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.
I confirm this change is actually not necessary to get fesetenv() working, but
I prefered to do the change, so that it don't break with a future version of
gcc.
> @@ -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?
Oh, I forget to tell that with this patch test-fenv now passes with gcc-4.3.
Otherwise, it does not include any regression.
--
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.