From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Bruno Haible <bruno@clisp.org>, libc-alpha@sourceware.org
Subject: Re: [PATCH 3/3] x86: Do not raises floating-point exception traps on fesetexceptflag (BZ 30990)
Date: Tue, 24 Oct 2023 08:13:18 -0300 [thread overview]
Message-ID: <1d41a3e3-56ff-4757-9c37-0d1a95ea1a00@linaro.org> (raw)
In-Reply-To: <11298458.rMLUfLXkoz@nimes>
On 23/10/23 21:19, Bruno Haible wrote:
> Adhemerval Zanella wrote:
>> diff --git a/math/test-fexcept-traps.c b/math/test-fexcept-traps.c
>> index 9b8f583ae6..a486d17951 100644
>> --- a/math/test-fexcept-traps.c
>> +++ b/math/test-fexcept-traps.c
>> @@ -67,6 +68,16 @@ do_test (void)
>> where setting the exception might result in traps the function should
>> return a nonzero value. */
>> ret = fesetexceptflag (&saved, FE_ALL_EXCEPT);
>> +
>> + /* Execute some floating-point operations, since on some CPUs exceptions
>> + triggers a trap only at the next floating-point instruction. */
>> + double a = 1.0;
>> + double b = a + a;
>> + math_force_eval (b);
>> + long double al = 1.0L;
>> + long double bl = al + al;
>
> Like in [2/3], I would mark the variables a, b, al, bl as 'volatile',
> otherwise it's too easy for GCC to do constant-folding and thus eliminate
> the floating-point operations.
Ack.
prev parent reply other threads:[~2023-10-24 11:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 21:36 [PATCH 0/3] Fix fesetexcept/fesetexceptflag on powerpc and x86 Adhemerval Zanella
2023-10-23 21:36 ` [PATCH 1/3] powerpc: Do not raise exception traps for fesetexcept/fesetexceptflag (BZ 30988) Adhemerval Zanella
2023-10-23 23:50 ` Bruno Haible
2023-10-23 21:36 ` [PATCH 2/3] i686: Do not raise exception traps on fesetexcept (BZ 30989) Adhemerval Zanella
2023-10-23 23:32 ` Joseph Myers
2023-10-24 0:17 ` Bruno Haible
2023-10-24 11:12 ` Adhemerval Zanella Netto
2023-10-24 13:35 ` Bruno Haible
2023-10-23 21:36 ` [PATCH 3/3] x86: Do not raises floating-point exception traps on fesetexceptflag (BZ 30990) Adhemerval Zanella
2023-10-24 0:19 ` Bruno Haible
2023-10-24 11:13 ` Adhemerval Zanella Netto [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1d41a3e3-56ff-4757-9c37-0d1a95ea1a00@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=bruno@clisp.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).