]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/riscv: refactor VSTART_CHECK_EARLY_EXIT() to accept vl as a parameter
authorChao Liu <lc00631@tecorigin.com>
Mon, 10 Mar 2025 02:35:24 +0000 (10:35 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 24 Mar 2025 11:21:24 +0000 (14:21 +0300)
commit7f5f3e5acd630c8b11b2a91f6d8ba2a0c6ab5524
tree4e15cc79da0203501a3175ab0b26001f67908f69
parent154ed561b32e5930984f28676f3aa4b604669b64
target/riscv: refactor VSTART_CHECK_EARLY_EXIT() to accept vl as a parameter

Some vector instructions are special, such as the vlm.v instruction,
where setting its vl actually sets evl = (vl + 7) >> 3. To improve
maintainability, we will uniformly use VSTART_CHECK_EARLY_EXIT() to
check for the condition vstart >= vl. This function will also handle
cases involving evl.

Fixes: df4252b2ec ("target/riscv/vector_helpers: do early exit when
vstart >= vl")
Signed-off-by: Chao Liu <lc00631@tecorigin.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <f575979874e323a9e0da7796aa391c7d87e56f88.1741573286.git.lc00631@tecorigin.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
(cherry picked from commit e83845316abcea9024eb5402a6c5eb8b092c79d5)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/riscv/vcrypto_helper.c
target/riscv/vector_helper.c
target/riscv/vector_internals.c
target/riscv/vector_internals.h