qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC v4 23/70] target/riscv: rvv-1.0: load/store whole register inst


From: Richard Henderson
Subject: Re: [RFC v4 23/70] target/riscv: rvv-1.0: load/store whole register instructions
Date: Sat, 29 Aug 2020 12:13:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 8/17/20 1:49 AM, frank.chang@sifive.com wrote:
> +/*
> + * load and store whole register instructions ignore vtype and vl setting.
> + * Thus, we don't need to check vill bit. (Section 7.9)
> + */
> +#define GEN_LDST_WHOLE_TRANS(NAME, EEW, ARGTYPE, ARG_NF, IS_STORE)     \
> +static bool trans_##NAME(DisasContext *s, arg_##ARGTYPE * a)           \
> +{                                                                      \
> +    if (require_rvv(s) &&                                              \
> +        QEMU_IS_ALIGNED(a->rd, ARG_NF)) {                              \
> +        uint32_t data = 0;                                             \
> +        bool ret;                                                      \
> +        data = FIELD_DP32(data, VDATA, NF, ARG_NF);                    \
> +        ret = ldst_whole_trans(a->rd, a->rs1, data, gen_helper_##NAME, \
> +                               s, IS_STORE);                           \
> +        return ret;                                                    \
> +    }                                                                  \
> +    return false;                                                      \
> +}

Decodetree is intentionally organized such that ARGTYPE = NAME.  There's no
point in duplicating that.  Move everything besides the call to
ldst_whole_trans into ldst_whole_trans.


r~



reply via email to

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