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 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.


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