This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Make x86_64 fegetenv preserve exception mask (bug 16198)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 26 Mar 2014 11:48:55 -0700
- Subject: Re: Make x86_64 fegetenv preserve exception mask (bug 16198)
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1403261736380 dot 27627 at digraph dot polyomino dot org dot uk>
On Wed, Mar 26, 2014 at 10:37 AM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> Bug 16198 is x86_64 fegetenv wrongly masking exceptions for which
> traps are enabled, because that's a side-effect of the fnstenv
> instruction. This patch fixes it to use fldenv immediately after
> fnstenv, like the i386 version. Tested x86_64 and x86.
>
> 2014-03-26 Joseph Myers <joseph@codesourcery.com>
>
> [BZ #16198]
> * sysdeps/x86_64/fpu/fegetenv.c (fegetenv): Use fldenv after
> fnstenv.
> * math/test-fenv-preserve.c: New file.
> * math/Makefile (tests): Add test-fenv-preserve.
>
Looks good to me. Thanks.
--
H.J.