target/arm: Simplify pstate_sm check in sve_access_check
In StreamingMode, fp_access_checked is handled already. We cannot fall through to fp_access_check lest we fall foul of the double-check assertion. Cc: qemu-stable@nongnu.org Fixes: 285b1d5fcef ("target/arm: Handle SME in sve_access_check") Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20250307190415.982049-3-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [PMM: move declaration of 'ret' to top of block] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
298a04998f
commit
cc7abc35df
@ -1456,23 +1456,23 @@ static int fp_access_check_vector_hsd(DisasContext *s, bool is_q, MemOp esz)
|
|||||||
bool sve_access_check(DisasContext *s)
|
bool sve_access_check(DisasContext *s)
|
||||||
{
|
{
|
||||||
if (s->pstate_sm || !dc_isar_feature(aa64_sve, s)) {
|
if (s->pstate_sm || !dc_isar_feature(aa64_sve, s)) {
|
||||||
|
bool ret;
|
||||||
|
|
||||||
assert(dc_isar_feature(aa64_sme, s));
|
assert(dc_isar_feature(aa64_sme, s));
|
||||||
if (!sme_sm_enabled_check(s)) {
|
ret = sme_sm_enabled_check(s);
|
||||||
goto fail_exit;
|
s->sve_access_checked = (ret ? 1 : -1);
|
||||||
}
|
return ret;
|
||||||
} else if (s->sve_excp_el) {
|
}
|
||||||
|
if (s->sve_excp_el) {
|
||||||
|
/* Assert that we only raise one exception per instruction. */
|
||||||
|
assert(!s->sve_access_checked);
|
||||||
gen_exception_insn_el(s, 0, EXCP_UDEF,
|
gen_exception_insn_el(s, 0, EXCP_UDEF,
|
||||||
syn_sve_access_trap(), s->sve_excp_el);
|
syn_sve_access_trap(), s->sve_excp_el);
|
||||||
goto fail_exit;
|
s->sve_access_checked = -1;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
s->sve_access_checked = 1;
|
s->sve_access_checked = 1;
|
||||||
return fp_access_check(s);
|
return fp_access_check(s);
|
||||||
|
|
||||||
fail_exit:
|
|
||||||
/* Assert that we only raise one exception per instruction. */
|
|
||||||
assert(!s->sve_access_checked);
|
|
||||||
s->sve_access_checked = -1;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user