Re: [PATCH 2/4] target/riscv: Add right functions to set agnostic elements

2024-03-19 Thread Huang Tao
I will rewrite the patch, and send a new version soon. Thanks, Huang Tao On 2024/3/20 07:32, Richard Henderson wrote: On 3/19/24 11:57, Daniel Henrique Barboza wrote: This seems correct but a bit over complicated at first glance. I wonder if we have something simpler already done somewhere.

Re: [PATCH 2/4] target/riscv: Add right functions to set agnostic elements

2024-03-19 Thread Richard Henderson
On 3/19/24 11:57, Daniel Henrique Barboza wrote: This seems correct but a bit over complicated at first glance. I wonder if we have something simpler already done somewhere. Richard, does ARM (or any other arch) do anything of the sort? Aside from more trivial byte swaps using bswap64() I didn

Re: [PATCH 2/4] target/riscv: Add right functions to set agnostic elements

2024-03-19 Thread Daniel Henrique Barboza
(--- CCing Richard ---) On 3/6/24 06:20, Huang Tao wrote: We add vext_set_elems_1s to set agnostic elements to 1s in both big and little endian situation. In the function vext_set_elems_1s. We using esz argument to get the first element to set. 'cnt' is just idx * esz. Signed-off-by: Huang Tao

[PATCH 2/4] target/riscv: Add right functions to set agnostic elements

2024-03-06 Thread Huang Tao
We add vext_set_elems_1s to set agnostic elements to 1s in both big and little endian situation. In the function vext_set_elems_1s. We using esz argument to get the first element to set. 'cnt' is just idx * esz. Signed-off-by: Huang Tao --- target/riscv/vector_internals.c | 53 ++