aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBranislav Brzak <brzakbranislav@gmail.com>2024-06-08 23:45:46 +0200
committerAlistair Francis <alistair.francis@wdc.com>2024-06-26 23:02:35 +1000
commit209b7c293585d0859396071ef00405c02aab5472 (patch)
tree6c69f4bceecf0a8d756134d4421c444af25276a8
parent4406ba2b5efce6af64905f827ca244f699db8170 (diff)
downloadqemu-209b7c293585d0859396071ef00405c02aab5472.zip
qemu-209b7c293585d0859396071ef00405c02aab5472.tar.gz
qemu-209b7c293585d0859396071ef00405c02aab5472.tar.bz2
target/riscv: Fix froundnx.h nanbox check
helper_froundnx_h function mistakenly uses single percision nanbox check instead of the half percision one. This patch fixes the issue. Signed-off-by: Branislav Brzak <brzakbranislav@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20240608214546.226963-1-brzakbranislav@gmail.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
-rw-r--r--target/riscv/fpu_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/riscv/fpu_helper.c b/target/riscv/fpu_helper.c
index 871a70a..91b1a56 100644
--- a/target/riscv/fpu_helper.c
+++ b/target/riscv/fpu_helper.c
@@ -676,7 +676,7 @@ uint64_t helper_fround_h(CPURISCVState *env, uint64_t rs1)
uint64_t helper_froundnx_h(CPURISCVState *env, uint64_t rs1)
{
- float16 frs1 = check_nanbox_s(env, rs1);
+ float16 frs1 = check_nanbox_h(env, rs1);
frs1 = float16_round_to_int(frs1, &env->fp_status);
return nanbox_h(env, frs1);
}