This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/18111] hppa: fesetexceptflag not correctly setting new flag.
- From: "carlos at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 11 Mar 2015 03:48:31 +0000
- Subject: [Bug math/18111] hppa: fesetexceptflag not correctly setting new flag.
- Auto-submitted: auto-generated
- References: <bug-18111-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18111
--- Comment #1 from Carlos O'Donell <carlos at redhat dot com> ---
The existing hppa code does this:
s.sw[0] |= (*flagp & excepts & FE_ALL_EXCEPT) << 27;
When it should do something like this:
excepts &= FE_ALL_EXCEPT;
s.sw[0] = s.sw[0] & ~(excepts << 27);
s.sw[0] |= (*flagp & excepts) << 27;
Which actually clears the flags if excepts specifies more flag bits than *flagp
sets.
While fixing this I decided to rewrite it using fpu_control.h to test the new
code, and in doing so fixed a bug in fpu_control.h with _FPU_SETCW not
initializing the other word is loads/stores.
--
You are receiving this mail because:
You are on the CC list for the bug.