]> git.proxmox.com Git - mirror_qemu.git/commit - target/hexagon/gen_tcg.h
Hexagon (target/hexagon) fix bug in mem_noshuf load exception
authorTaylor Simpson <tsimpson@quicinc.com>
Thu, 7 Jul 2022 21:05:46 +0000 (14:05 -0700)
committerTaylor Simpson <tsimpson@quicinc.com>
Tue, 19 Jul 2022 21:20:08 +0000 (14:20 -0700)
commit15fc6badbd28a126346f84c1acae48e273b66b67
tree4a165d8022dbff4ad2df0c06e0e3d044efe50680
parentcab86dea1d205f5224770de294cc718be467ccf8
Hexagon (target/hexagon) fix bug in mem_noshuf load exception

The semantics of a mem_noshuf packet are that the store effectively
happens before the load.  However, in cases where the load raises an
exception, we cannot simply execute the store first.

This change adds a probe to check that the load will not raise an
exception before executing the store.

If the load is predicated, this requires special handling.  We check
the condition before performing the probe.  Since, we need the EA to
perform the check, we move the GET_EA portion inside CHECK_NOSHUF_PRED.

Test case added in tests/tcg/hexagon/mem_noshuf_exception.c

Suggested-by: Alessandro Di Federico <ale@rev.ng>
Suggested-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220707210546.15985-3-tsimpson@quicinc.com>
target/hexagon/gen_tcg.h
target/hexagon/genptr.c
target/hexagon/helper.h
target/hexagon/macros.h
target/hexagon/op_helper.c
tests/tcg/hexagon/Makefile.target
tests/tcg/hexagon/mem_noshuf_exception.c [new file with mode: 0644]