qemu-riscv
[Top][All Lists]
Advanced

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

Re: [RFC v2 59/76] target/riscv: rvv-0.9: floating-point slide instructi


From: Frank Chang
Subject: Re: [RFC v2 59/76] target/riscv: rvv-0.9: floating-point slide instructions
Date: Mon, 3 Aug 2020 18:35:22 +0800

On Sat, Aug 1, 2020 at 12:05 AM Richard Henderson <richard.henderson@linaro.org> wrote:
On 7/22/20 2:16 AM, frank.chang@sifive.com wrote:
> +DEF_HELPER_6(vfslide1up_vf_h, void, ptr, ptr, i64, ptr, env, i32)
> +DEF_HELPER_6(vfslide1up_vf_w, void, ptr, ptr, i64, ptr, env, i32)
> +DEF_HELPER_6(vfslide1up_vf_d, void, ptr, ptr, i64, ptr, env, i32)
> +DEF_HELPER_6(vfslide1down_vf_h, void, ptr, ptr, i64, ptr, env, i32)
> +DEF_HELPER_6(vfslide1down_vf_w, void, ptr, ptr, i64, ptr, env, i32)
> +DEF_HELPER_6(vfslide1down_vf_d, void, ptr, ptr, i64, ptr, env, i32)

You should not need new helpers.

The only difference between vfslide1up and vslide1up is the source and the
nanboxing.  Which you can do in the translator before using the existing helpers.


r~

I agree that the implementation of vslide1up's helper function can be
reused by vfslide1up.

However, I've encountered an issue
where the helper function called in opfvf_trans() used by vfslide1up
takes TCGv_i64 type as s1 parameter.
This conflicts with vslide1up's helper function called in opivx_trans(),
where s1 parameter is the type of TCGv rather than TCGv_i64.

i.e.
DEF_HELPER_6(vslide1up_vx_w, void, ptr, ptr, tl, ptr, env, i32) vs.
DEF_HELPER_6(vfslide1up_vf_h, void, ptr, ptr, i64, ptr, env, i32)

As opfvf_trans() and opivx_trans() are shared among other instructions,
I wouldn't like to make prototype changes to these functions.

So far what I can come up with is to extract the logic in vslide1up's
helper function to an individual static function and make vslide1up
and vfslide1up's helper functions to call this static function.

So that the're no redundant logic to be redefined.
However, this still require to declare vfslide1up's helper function explicitly
as its function prototype is different with vslide1up.

Any suggestions to this issue?

Thanks
Frank Chang

reply via email to

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