From: Daniel Cederman <cederman@gaisler.com>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
libc-alpha@sourceware.org
Cc: daniel@gaisler.com, andreas@gaisler.com
Subject: Re: [PATCH] sparc: Prevent stfsr from directly following floating-point instruction
Date: Mon, 15 Jan 2024 10:37:49 +0100 [thread overview]
Message-ID: <c66a3822-ac2c-436f-a6ed-04aba8c105ff@gaisler.com> (raw)
In-Reply-To: <77658cde-97f2-4017-aba9-8d062a6cddba@linaro.org>
On 2024-01-12 15:38, Adhemerval Zanella Netto wrote:
>
>
> On 12/01/24 06:26, Daniel Cederman wrote:
>> On LEON, if the stfsr instruction is immediately following a floating-point
>> operation instruction in a running program, with no other instruction in
>> between the two, the stfsr might behave as if the order was reversed
>> between the two instructions and the stfsr occurred before the
>> floating-point operation.
>>
>> Add a nop instruction before the stfsr to prevent this from happening.
>>
>> Signed-off-by: Daniel Cederman <cederman@gaisler.com>
>
> You might want to check if __builtin_store_fsr gcc builtin is also subject
> to this issue (it used on atomic floating point support as well).
>
Thank you for reviewing the patches! I will address your comments and
send an updated version. I was not aware of the gcc builtin for fsr so
that is likely something that needs to be fixed. Thanks!
/Daniel
next prev parent reply other threads:[~2024-01-15 9:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 9:26 [PATCH] sparc: Do not test preservation of NaN payloads for LEON Daniel Cederman
2024-01-12 9:26 ` [PATCH] sparc: Prevent stfsr from directly following floating-point instruction Daniel Cederman
2024-01-12 14:38 ` Adhemerval Zanella Netto
2024-01-15 9:37 ` Daniel Cederman [this message]
2024-01-12 9:26 ` [PATCH] sparc: Force calculation that raises exception Daniel Cederman
2024-01-12 16:45 ` Adhemerval Zanella Netto
2024-01-15 9:41 ` Daniel Cederman
2024-01-15 11:47 ` Adhemerval Zanella Netto
2024-01-12 9:26 ` [PATCH] sparc: Treat the version field in the FPU control word as reserved Daniel Cederman
2024-01-12 17:42 ` Adhemerval Zanella Netto
2024-02-15 9:31 ` Daniel Cederman
2024-02-19 14:55 ` Adhemerval Zanella Netto
2024-01-12 9:26 ` [PATCH] sparc: Fix llrint and llround missing exceptions on SPARC32 Daniel Cederman
2024-01-12 18:05 ` Adhemerval Zanella Netto
2024-01-15 14:38 ` Daniel Cederman
2024-01-15 17:52 ` Adhemerval Zanella Netto
2024-01-12 9:26 ` [PATCH] sparc: Remove unwind information from signal return stub functions Daniel Cederman
2024-01-15 13:41 ` Adhemerval Zanella Netto
2024-01-15 14:22 ` Daniel Cederman
2024-01-15 16:57 ` Adhemerval Zanella Netto
2024-01-16 15:37 ` [PATCH] sparc: Do not test preservation of NaN payloads for LEON Adhemerval Zanella Netto
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=c66a3822-ac2c-436f-a6ed-04aba8c105ff@gaisler.com \
--to=cederman@gaisler.com \
--cc=adhemerval.zanella@linaro.org \
--cc=andreas@gaisler.com \
--cc=daniel@gaisler.com \
--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).