diff options
author | Taylor Simpson <tsimpson@quicinc.com> | 2022-07-07 14:05:46 -0700 |
---|---|---|
committer | Taylor Simpson <tsimpson@quicinc.com> | 2022-07-19 14:20:08 -0700 |
commit | 15fc6badbd28a126346f84c1acae48e273b66b67 (patch) | |
tree | 4a165d8022dbff4ad2df0c06e0e3d044efe50680 /target/hexagon/helper.h | |
parent | cab86dea1d205f5224770de294cc718be467ccf8 (diff) |
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>
Diffstat (limited to 'target/hexagon/helper.h')
-rw-r--r-- | target/hexagon/helper.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/target/hexagon/helper.h b/target/hexagon/helper.h index c89aa4ed4d..368f0b5708 100644 --- a/target/hexagon/helper.h +++ b/target/hexagon/helper.h @@ -104,6 +104,7 @@ DEF_HELPER_1(vwhist128q, void, env) DEF_HELPER_2(vwhist128m, void, env, s32) DEF_HELPER_2(vwhist128qm, void, env, s32) +DEF_HELPER_4(probe_noshuf_load, void, env, i32, int, int) DEF_HELPER_2(probe_pkt_scalar_store_s0, void, env, int) DEF_HELPER_2(probe_hvx_stores, void, env, int) DEF_HELPER_3(probe_pkt_scalar_hvx_stores, void, env, int, int) |