From: Alistair Francis <alistair23@gmail.com>
To: Frank Chang <frank.chang@sifive.com>
Cc: "open list:RISC-V" <qemu-riscv@nongnu.org>,
Bin Meng <bin.meng@windriver.com>,
Richard Henderson <richard.henderson@linaro.org>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Alistair Francis <alistair.francis@wdc.com>,
LIU Zhiwei <zhiwei_liu@c-sky.com>
Subject: Re: [PATCH v2 03/17] target/riscv: rvv-1.0: Add Zve64f support for load and store insns
Date: Tue, 18 Jan 2022 14:42:43 +1000 [thread overview]
Message-ID: <CAKmqyKMjWN=Ec3m3_H2ArQTHzE8EXgLnZiX-=kPLH8ydRrfVBA@mail.gmail.com> (raw)
In-Reply-To: <20220118014522.13613-4-frank.chang@sifive.com>
On Tue, Jan 18, 2022 at 11:59 AM <frank.chang@sifive.com> wrote:
>
> From: Frank Chang <frank.chang@sifive.com>
>
> All Zve* extensions support all vector load and store instructions,
> except Zve64* extensions do not support EEW=64 for index values when
> XLEN=32.
>
> Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> target/riscv/insn_trans/trans_rvv.c.inc | 19 +++++++++++++++----
> 1 file changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_trans/trans_rvv.c.inc
> index 5b47729a21..0bf41aaa1e 100644
> --- a/target/riscv/insn_trans/trans_rvv.c.inc
> +++ b/target/riscv/insn_trans/trans_rvv.c.inc
> @@ -263,10 +263,21 @@ static bool vext_check_st_index(DisasContext *s, int vd, int vs2, int nf,
> uint8_t eew)
> {
> int8_t emul = eew - s->sew + s->lmul;
> - return (emul >= -3 && emul <= 3) &&
> - require_align(vs2, emul) &&
> - require_align(vd, s->lmul) &&
> - require_nf(vd, nf, s->lmul);
> + bool ret = (emul >= -3 && emul <= 3) &&
> + require_align(vs2, emul) &&
> + require_align(vd, s->lmul) &&
> + require_nf(vd, nf, s->lmul);
> +
> + /*
> + * All Zve* extensions support all vector load and store instructions,
> + * except Zve64* extensions do not support EEW=64 for index values
> + * when XLEN=32. (Section 18.2)
> + */
> + if (get_xl(s) == MXL_RV32) {
> + ret &= (!has_ext(s, RVV) && s->ext_zve64f ? eew != MO_64 : true);
> + }
> +
> + return ret;
> }
>
> /*
> --
> 2.31.1
>
>
next prev parent reply other threads:[~2022-01-18 4:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-18 1:45 [PATCH v2 00/17] Add RISC-V RVV Zve32f and Zve64f extensions frank.chang
2022-01-18 1:45 ` [PATCH v2 01/17] target/riscv: rvv-1.0: Add Zve64f extension into RISC-V frank.chang
2022-01-18 1:45 ` [PATCH v2 02/17] target/riscv: rvv-1.0: Add Zve64f support for configuration insns frank.chang
2022-01-18 1:45 ` [PATCH v2 03/17] target/riscv: rvv-1.0: Add Zve64f support for load and store insns frank.chang
2022-01-18 4:42 ` Alistair Francis [this message]
2022-01-18 1:45 ` [PATCH v2 04/17] target/riscv: rvv-1.0: Add Zve64f support for vmulh variant insns frank.chang
2022-01-18 1:45 ` [PATCH v2 05/17] target/riscv: rvv-1.0: Add Zve64f support for vsmul.vv and vsmul.vx insns frank.chang
2022-01-18 1:45 ` [PATCH v2 06/17] target/riscv: rvv-1.0: Add Zve64f support for scalar fp insns frank.chang
2022-01-18 1:45 ` [PATCH v2 07/17] target/riscv: rvv-1.0: Add Zve64f support for single-width fp reduction insns frank.chang
2022-01-18 1:45 ` [PATCH v2 08/17] target/riscv: rvv-1.0: Add Zve64f support for widening type-convert insns frank.chang
2022-01-18 1:45 ` [PATCH v2 09/17] target/riscv: rvv-1.0: Add Zve64f support for narrowing " frank.chang
2022-01-18 1:45 ` [PATCH v2 10/17] target/riscv: rvv-1.0: Allow Zve64f extension to be turned on frank.chang
2022-01-18 1:45 ` [PATCH v2 11/17] target/riscv: rvv-1.0: Add Zve32f extension into RISC-V frank.chang
2022-01-18 1:45 ` [PATCH v2 12/17] target/riscv: rvv-1.0: Add Zve32f support for configuration insns frank.chang
2022-01-18 1:45 ` [PATCH v2 13/17] target/riscv: rvv-1.0: Add Zve32f support for scalar fp insns frank.chang
2022-01-18 1:45 ` [PATCH v2 14/17] target/riscv: rvv-1.0: Add Zve32f support for single-width fp reduction insns frank.chang
2022-01-18 1:45 ` [PATCH v2 15/17] target/riscv: rvv-1.0: Add Zve32f support for widening type-convert insns frank.chang
2022-01-18 1:45 ` [PATCH v2 16/17] target/riscv: rvv-1.0: Add Zve32f support for narrowing " frank.chang
2022-01-18 1:45 ` [PATCH v2 17/17] target/riscv: rvv-1.0: Allow Zve32f extension to be turned on frank.chang
2022-01-18 22:25 ` [PATCH v2 00/17] Add RISC-V RVV Zve32f and Zve64f extensions Alistair Francis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKmqyKMjWN=Ec3m3_H2ArQTHzE8EXgLnZiX-=kPLH8ydRrfVBA@mail.gmail.com' \
--to=alistair23@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=bin.meng@windriver.com \
--cc=frank.chang@sifive.com \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=zhiwei_liu@c-sky.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).