This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Call math_opt_barrier inside if
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 14 Jan 2016 14:27:34 -0800
- Subject: Re: [PATCH] Call math_opt_barrier inside if
- Authentication-results: sourceware.org; auth=none
- References: <20160114214145 dot GA22984 at intel dot com> <alpine dot DEB dot 2 dot 10 dot 1601142212190 dot 27845 at digraph dot polyomino dot org dot uk>
On Thu, Jan 14, 2016 at 2:13 PM, Joseph Myers <joseph@codesourcery.com> wrote:
> On Thu, 14 Jan 2016, H.J. Lu wrote:
>
>> Since floating-point operation may trigger floating-point exceptions,
>> we call math_opt_barrier inside if to prevent code motion.
>>
>> Tested on x86-64. OK for trunk?
>
> Please send a patch updating all implementations for which this issue is
> applicable.
There are
dbl-64/e_sqrt.c: libc_feholdexcept_setround (&env, FE_TONEAREST);
dbl-64/s_fma.c: libc_feholdexcept_setround (&env, FE_TONEAREST);
dbl-64/s_fmaf.c: libc_feholdexcept_setround (&env, FE_TOWARDZERO);
under sysdeps/ieee754. dbl-64/s_fma.c is the only one with this
problem.
--
H.J.