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 math/18111] hppa: fesetexceptflag not correctly setting new flag.


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.


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