From: Richard Henderson <richard.henderson@linaro.org>
To: Palmer Dabbelt <palmer@sifive.com>, qemu-riscv@nongnu.org
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] RISC-V: fcvt can set fflags, so set FS accordingly
Date: Wed, 9 Oct 2019 18:26:15 -0400 [thread overview]
Message-ID: <6acbc2de-66b2-a363-cbaa-bf1f458fdf62@linaro.org> (raw)
In-Reply-To: <20191009211541.9937-1-palmer@sifive.com>
On 10/9/19 5:15 PM, Palmer Dabbelt wrote:
> A user pinged me to say "my floating point heavy code works in user mode
> but not system mode", which I'm guessing is the result of a lazy FP
> save/restore issue as those still crop up from time to time as long tail
> bugs. I figured it was worth giving the FP stuff a look to see if
> anything jumps out, and it turns out that there is a bug: converting
> float to integer can set the invalid flag, which is supposed to mark FS
> as dirty, but the emulation routine doesn't do so.
>
> This patch unconditionally marks FS as dirty for fcvt instructions that
> convert into X registers (fcvt into F registers already did so). I
> haven't actually tried to manifest a bug here, but as far as I can tell
> the soft float stuff does set the invalid flag.
>
> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
> ---
> target/riscv/insn_trans/trans_rvd.inc.c | 2 ++
> target/riscv/insn_trans/trans_rvf.inc.c | 4 ++++
> 2 files changed, 6 insertions(+)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
prev parent reply other threads:[~2019-10-09 22:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-09 21:15 [PATCH] RISC-V: fcvt can set fflags, so set FS accordingly Palmer Dabbelt
2019-10-09 22:26 ` Richard Henderson [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=6acbc2de-66b2-a363-cbaa-bf1f458fdf62@linaro.org \
--to=richard.henderson@linaro.org \
--cc=palmer@sifive.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.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 NNTP newsgroup(s).