Re: [PATCH v2 2/5] target/hexagon: fix HVX scatter/gather region-length check

Matheus Tavares Bernardino <[email protected]>
Newsgroups org.nongnu.qemu-devel
Message-ID <[email protected]>
On Thu, 20 Aug 2026 14:51:14 -0700 Brian Cain <[email protected]> wrote:
>
> The region-length bounds check compared (EA + i0) <= (EA + LEN),
> which reduces to i0 <= LEN and never actually depends on the region
> base. This let vgather/vscatter keep elements whose offset was
> beyond the declared region instead of dropping them. Compare the
> offset to the region length directly instead.
> 
> Only load bytes for gather lanes that are kept. A dropped or
> predicate-false lane must not access memory and raise an exception.
> 
> Signed-off-by: Brian Cain <[email protected]>
> ---
>  target/hexagon/mmvec/macros.h | 31 +++++++++++++++++--------------
>  1 file changed, 17 insertions(+), 14 deletions(-)

Reviewed-by: Matheus Tavares Bernardino <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.