diff options
author | Stafford Horne <shorne@gmail.com> | 2023-03-17 04:18:36 +0900 |
---|---|---|
committer | Stafford Horne <shorne@gmail.com> | 2023-05-11 15:40:28 +0100 |
commit | 874c52991e1fbe020812b4b15440b6875369aacf (patch) | |
tree | a489ae60bad94c10cb4fedba418c42028d94d478 | |
parent | 9156ca76cb39ff1d72e701dec4a907f73592d88f (diff) | |
download | qemu-874c52991e1fbe020812b4b15440b6875369aacf.zip qemu-874c52991e1fbe020812b4b15440b6875369aacf.tar.gz qemu-874c52991e1fbe020812b4b15440b6875369aacf.tar.bz2 |
target/openrisc: Setup FPU for detecting tininess before rounding
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>
-rw-r--r-- | target/openrisc/cpu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index 0ce4f79..61d748c 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; |