[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 3/3] target/openrisc: Setup FPU for detecting tininess before
|
From: |
Stafford Horne |
|
Subject: |
[PATCH v3 3/3] target/openrisc: Setup FPU for detecting tininess before rounding |
|
Date: |
Thu, 11 May 2023 16:09:59 +0100 |
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>
---
Since v2:
- Add reviewed-by
Since v1:
- Remove setting default NaN behavior.
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