mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
cab86dea1d
commit
15fc6badbd
7 changed files with 206 additions and 21 deletions
|
@ -638,5 +638,12 @@ static void vec_to_qvec(size_t size, intptr_t dstoff, intptr_t srcoff)
|
|||
tcg_temp_free_i64(mask);
|
||||
}
|
||||
|
||||
static void probe_noshuf_load(TCGv va, int s, int mi)
|
||||
{
|
||||
TCGv size = tcg_constant_tl(s);
|
||||
TCGv mem_idx = tcg_constant_tl(mi);
|
||||
gen_helper_probe_noshuf_load(cpu_env, va, size, mem_idx);
|
||||
}
|
||||
|
||||
#include "tcg_funcs_generated.c.inc"
|
||||
#include "tcg_func_table_generated.c.inc"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue