qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] target/openrisc: Setup FPU for detecting tininess before


From: Richard Henderson
Subject: Re: [PATCH 3/3] target/openrisc: Setup FPU for detecting tininess before rounding
Date: Wed, 3 May 2023 08:37:31 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

On 5/2/23 19:57, Stafford Horne wrote:
OpenRISC defines tininess to be detected before rounding.  Setup qemu to
obey this.

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
  target/openrisc/cpu.c | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c
index 0ce4f796fa..cdbff26fb5 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,10 @@ static void openrisc_cpu_reset_hold(Object *obj)
      s->exception_index = -1;
      cpu_set_fpcsr(&cpu->env, 0);
+ set_default_nan_mode(1, &cpu->env.fp_status);
+    set_float_detect_tininess(float_tininess_before_rounding,
+                              &cpu->env.fp_status);

You don't mention the nan change in the commit message.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]