From: Stafford Horne <shorne@gmail.com>
To: QEMU Development <qemu-devel@nongnu.org>
Cc: Stafford Horne <shorne@gmail.com>,
Richard Henderson <richard.henderson@linaro.org>
Subject: [PULL 3/3] target/openrisc: Setup FPU for detecting tininess before rounding
Date: Sat, 13 May 2023 09:05:34 +0100 [thread overview]
Message-ID: <20230513080534.580800-4-shorne@gmail.com> (raw)
In-Reply-To: <20230513080534.580800-1-shorne@gmail.com>
OpenRISC defines tininess to be detected before rounding. Setup qemu to
obey this.
Signed-off-by: Stafford Horne <shorne@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
target/openrisc/cpu.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c
index 0ce4f796fa..61d748cfdc 100644
--- a/target/openrisc/cpu.c
+++ b/target/openrisc/cpu.c
@@ -22,6 +22,7 @@
#include "qemu/qemu-print.h"
#include "cpu.h"
#include "exec/exec-all.h"
+#include "fpu/softfloat-helpers.h"
#include "tcg/tcg.h"
static void openrisc_cpu_set_pc(CPUState *cs, vaddr value)
@@ -90,6 +91,9 @@ static void openrisc_cpu_reset_hold(Object *obj)
s->exception_index = -1;
cpu_set_fpcsr(&cpu->env, 0);
+ set_float_detect_tininess(float_tininess_before_rounding,
+ &cpu->env.fp_status);
+
#ifndef CONFIG_USER_ONLY
cpu->env.picmr = 0x00000000;
cpu->env.picsr = 0x00000000;
--
2.39.1
next prev parent reply other threads:[~2023-05-13 8:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-13 8:05 [PULL 0/3] OpenRISC FPU Updates for 8.1 Stafford Horne
2023-05-13 8:05 ` [PULL 1/3] target/openrisc: Allow fpcsr access in user mode Stafford Horne
2023-05-13 8:05 ` [PULL 2/3] target/openrisc: Set PC to cpu state on FPU exception Stafford Horne
2023-05-13 8:05 ` Stafford Horne [this message]
2023-05-14 1:24 ` [PULL 0/3] OpenRISC FPU Updates for 8.1 Richard Henderson
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=20230513080534.580800-4-shorne@gmail.com \
--to=shorne@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).