Re: [PATCH] riscv: Add support for the Zfa extension

2023-04-13 Thread Christoph Müllner
On Fri, Mar 31, 2023 at 11:39 PM Richard Henderson wrote: > > On 3/31/23 11:22, Christoph Müllner wrote: > > On Mon, Mar 27, 2023 at 7:18 PM Richard Henderson > > wrote: > >> > >> On 3/27/23 01:00, Christoph Muellner wrote: > >>> +uint64_t helper_fminm_s(CPURISCVState *env, uint64_t rs1, uint64_t

Re: [PATCH] riscv: Add support for the Zfa extension

2023-03-31 Thread Richard Henderson
On 3/31/23 11:22, Christoph Müllner wrote: On Mon, Mar 27, 2023 at 7:18 PM Richard Henderson wrote: On 3/27/23 01:00, Christoph Muellner wrote: +uint64_t helper_fminm_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +{ +float32 frs1 = check_nanbox_s(env, rs1); +float32 frs2 = check_n

Re: [PATCH] riscv: Add support for the Zfa extension

2023-03-31 Thread Christoph Müllner
On Mon, Mar 27, 2023 at 10:42 AM liweiwei wrote: > > > On 2023/3/27 16:00, Christoph Muellner wrote: > > From: Christoph Müllner > > > > This patch introduces the RISC-V Zfa extension, which introduces > > additional floating-point extensions: > > * fli (load-immediate) with pre-defined immediate

Re: [PATCH] riscv: Add support for the Zfa extension

2023-03-31 Thread Christoph Müllner
On Mon, Mar 27, 2023 at 7:18 PM Richard Henderson wrote: > > On 3/27/23 01:00, Christoph Muellner wrote: > > +uint64_t helper_fminm_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) > > +{ > > +float32 frs1 = check_nanbox_s(env, rs1); > > +float32 frs2 = check_nanbox_s(env, rs2); > > + > >

Re: [PATCH] riscv: Add support for the Zfa extension

2023-03-27 Thread Richard Henderson
On 3/27/23 01:00, Christoph Muellner wrote: +uint64_t helper_fminm_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +{ +float32 frs1 = check_nanbox_s(env, rs1); +float32 frs2 = check_nanbox_s(env, rs2); + +if (float32_is_any_nan(frs1) || float32_is_any_nan(frs2)) { +return fl

Re: [PATCH] riscv: Add support for the Zfa extension

2023-03-27 Thread liweiwei
On 2023/3/27 16:00, Christoph Muellner wrote: From: Christoph Müllner This patch introduces the RISC-V Zfa extension, which introduces additional floating-point extensions: * fli (load-immediate) with pre-defined immediates * fminm/fmaxm (like fmin/fmax but with different NaN behaviour) * fro

[PATCH] riscv: Add support for the Zfa extension

2023-03-27 Thread Christoph Muellner
From: Christoph Müllner This patch introduces the RISC-V Zfa extension, which introduces additional floating-point extensions: * fli (load-immediate) with pre-defined immediates * fminm/fmaxm (like fmin/fmax but with different NaN behaviour) * fround/froundmx (round to integer) * fcvtmod.w.d (Mod