qemu-riscv
[Top][All Lists]
Advanced

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

Re: [PATCH v9 04/10] target/riscv/vector_helper.c: update tail with vext


From: Daniel Henrique Barboza
Subject: Re: [PATCH v9 04/10] target/riscv/vector_helper.c: update tail with vext_set_tail_elems_1s()
Date: Sun, 10 Mar 2024 06:50:18 -0300
User-agent: Mozilla Thunderbird



On 3/10/24 04:41, Richard Henderson wrote:
On 3/9/24 10:43, Daniel Henrique Barboza wrote:
Change all code that updates tail elems to use vext_set_tail_elems_1s()
instead of vext_set_elems_1s().

Setting 'env->vstart=0' needs to be the very last thing a helper does
because env->vstart is being checked by vext_set_tail_elems_1s().

I did wonder if it would be worth doing the vstart = 0 in 
vext_set_tail_elems_1s, allowing that to be the very last thing in each helper, 
and could be tail called.


Some insns don't update tail, e.g. vext_ldst_whole(), and we would need to
clear vstart explicitly in them regardless. Might as well deal with clearing
vstart in every helper to make them consistent.


Thanks,

Daniel



A side effect of this change is that a lot of 'vta' local variables got
unused. The reason is that 'vta' was being fetched to be used with
vext_set_elems_1s() but vext_set_tail_elems_1s() doesn't use it - 'vta' is
retrieve inside the helper using 'desc'.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

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


r~



reply via email to

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