qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v11 3/7] target/riscv/vector_helpers: do early exit when vsta


From: Richard Henderson
Subject: Re: [PATCH v11 3/7] target/riscv/vector_helpers: do early exit when vstart >= vl
Date: Mon, 11 Mar 2024 07:13:47 -1000
User-agent: Mozilla Thunderbird

On 3/11/24 03:58, Daniel Henrique Barboza wrote:
We're going to make changes that will required each helper to be
responsible for the 'vstart' management, i.e. we will relieve the
'vstart < vl' assumption that helpers have today.

Helpers are usually able to deal with vstart >= vl, i.e. doing nothing
aside from setting vstart = 0 at the end, but the tail update functions
will update the tail regardless of vstart being valid or not.

Unifying the tail update process in a single function that would handle
the vstart >= vl case isn't trivial. We have 2 functions that are used
to update tail: vext_set_tail_elems_1s() and vext_set_elems_1s(). The
latter is a more generic function that is also used to mask elements.
There's no easy way of making all callers using vext_set_tail_elems_1s()
because we're not encoding NF properly in all cases [1].

This patch takes a blunt approach: do an early exit in every single
vector helper if vstart >= vl. We can worry about unifying the tail
update process later.

[1]1590234b-0291-432a-a0fa-c5a6876097bc@linux.alibaba.com/">https://lore.kernel.org/qemu-riscv/1590234b-0291-432a-a0fa-c5a6876097bc@linux.alibaba.com/

Signed-off-by: Daniel Henrique Barboza<dbarboza@ventanamicro.com>
---
  target/riscv/vcrypto_helper.c   | 32 ++++++++++++
  target/riscv/vector_helper.c    | 90 +++++++++++++++++++++++++++++++++
  target/riscv/vector_internals.c |  4 ++
  target/riscv/vector_internals.h |  9 ++++
  4 files changed, 135 insertions(+)

This does seem like the only viable short-term solution.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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