* [PATCH] target/riscv: Fix froundnx.h nanbox check
@ 2024-06-08 21:45 Branislav Brzak
2024-06-21 4:20 ` Alistair Francis
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Branislav Brzak @ 2024-06-08 21:45 UTC (permalink / raw)
To: qemu-riscv; +Cc: qemu-devel, alistair.francis, Branislav Brzak
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>
---
target/riscv/fpu_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/riscv/fpu_helper.c b/target/riscv/fpu_helper.c
index 871a70a316..91b1a56d10 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);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] target/riscv: Fix froundnx.h nanbox check
2024-06-08 21:45 [PATCH] target/riscv: Fix froundnx.h nanbox check Branislav Brzak
@ 2024-06-21 4:20 ` Alistair Francis
2024-06-21 4:22 ` Richard Henderson
2024-06-21 4:44 ` Alistair Francis
2 siblings, 0 replies; 4+ messages in thread
From: Alistair Francis @ 2024-06-21 4:20 UTC (permalink / raw)
To: Branislav Brzak; +Cc: qemu-riscv, qemu-devel, alistair.francis
On Sun, Jun 9, 2024 at 3:32 PM Branislav Brzak <brzakbranislav@gmail.com> wrote:
>
> 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>
Alistair
> ---
> target/riscv/fpu_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/riscv/fpu_helper.c b/target/riscv/fpu_helper.c
> index 871a70a316..91b1a56d10 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);
> }
> --
> 2.34.1
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] target/riscv: Fix froundnx.h nanbox check
2024-06-08 21:45 [PATCH] target/riscv: Fix froundnx.h nanbox check Branislav Brzak
2024-06-21 4:20 ` Alistair Francis
@ 2024-06-21 4:22 ` Richard Henderson
2024-06-21 4:44 ` Alistair Francis
2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2024-06-21 4:22 UTC (permalink / raw)
To: Branislav Brzak, qemu-riscv; +Cc: qemu-devel, alistair.francis
On 6/8/24 14:45, Branislav Brzak wrote:
> t/riscv/fpu_helper.c b/target/riscv/fpu_helper.c
> index 871a70a316..91b1a56d10 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);
> }
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] target/riscv: Fix froundnx.h nanbox check
2024-06-08 21:45 [PATCH] target/riscv: Fix froundnx.h nanbox check Branislav Brzak
2024-06-21 4:20 ` Alistair Francis
2024-06-21 4:22 ` Richard Henderson
@ 2024-06-21 4:44 ` Alistair Francis
2 siblings, 0 replies; 4+ messages in thread
From: Alistair Francis @ 2024-06-21 4:44 UTC (permalink / raw)
To: Branislav Brzak; +Cc: qemu-riscv, qemu-devel, alistair.francis
On Sun, Jun 9, 2024 at 3:32 PM Branislav Brzak <brzakbranislav@gmail.com> wrote:
>
> 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>
Thanks!
Applied to riscv-to-apply.next
Alistair
> ---
> target/riscv/fpu_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/riscv/fpu_helper.c b/target/riscv/fpu_helper.c
> index 871a70a316..91b1a56d10 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);
> }
> --
> 2.34.1
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-21 4:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-08 21:45 [PATCH] target/riscv: Fix froundnx.h nanbox check Branislav Brzak
2024-06-21 4:20 ` Alistair Francis
2024-06-21 4:22 ` Richard Henderson
2024-06-21 4:44 ` Alistair Francis
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).