target/arm: add bounding a->imm assertion
PATCH 1/1 target/arm: add bounding a->imm assertion
Add an assertion similar to that in the do_shr_narrow(). This will make sure that functions from sshll_ops have correct arguments.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by Anastasia Belova <[email protected]>
--- target/arm/tcg/translate-sve.c | 1 + 1 file changed, 1 insertion(+)
target/arm/tcg/translate-sve.c +1 -0
@@ -6250,6 +6250,7 @@ static bool do_shll_tb(DisasContext *s, arg_rri_esz *a,if (a->esz <0 || a->esz >2 ) {return false; } +assert (a->imm >0 && a->imm <= (8 << a->esz));if (sve_access_check (s)) {unsigned vsz =vec_full_reg_size (s); tcg_gen_gvec_2i(vec_full_reg_offset(s, a->rd),
Signature · 1 line
2.47.0