target/arm: Move null function and sve check into gen_gvec_ool_zzp
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220527181907.189259-20-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
8740d69416
commit
8fb27a21b1
|
@ -206,14 +206,20 @@ static bool gen_gvec_ool_arg_zzxz(DisasContext *s, gen_helper_gvec_4 *fn,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Invoke an out-of-line helper on 2 Zregs and a predicate. */
|
/* Invoke an out-of-line helper on 2 Zregs and a predicate. */
|
||||||
static void gen_gvec_ool_zzp(DisasContext *s, gen_helper_gvec_3 *fn,
|
static bool gen_gvec_ool_zzp(DisasContext *s, gen_helper_gvec_3 *fn,
|
||||||
int rd, int rn, int pg, int data)
|
int rd, int rn, int pg, int data)
|
||||||
{
|
{
|
||||||
unsigned vsz = vec_full_reg_size(s);
|
if (fn == NULL) {
|
||||||
tcg_gen_gvec_3_ool(vec_full_reg_offset(s, rd),
|
return false;
|
||||||
vec_full_reg_offset(s, rn),
|
}
|
||||||
pred_full_reg_offset(s, pg),
|
if (sve_access_check(s)) {
|
||||||
vsz, vsz, data, fn);
|
unsigned vsz = vec_full_reg_size(s);
|
||||||
|
tcg_gen_gvec_3_ool(vec_full_reg_offset(s, rd),
|
||||||
|
vec_full_reg_offset(s, rn),
|
||||||
|
pred_full_reg_offset(s, pg),
|
||||||
|
vsz, vsz, data, fn);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Invoke an out-of-line helper on 3 Zregs and a predicate. */
|
/* Invoke an out-of-line helper on 3 Zregs and a predicate. */
|
||||||
|
@ -801,13 +807,7 @@ static bool trans_SEL_zpzz(DisasContext *s, arg_rprr_esz *a)
|
||||||
|
|
||||||
static bool do_zpz_ool(DisasContext *s, arg_rpr_esz *a, gen_helper_gvec_3 *fn)
|
static bool do_zpz_ool(DisasContext *s, arg_rpr_esz *a, gen_helper_gvec_3 *fn)
|
||||||
{
|
{
|
||||||
if (fn == NULL) {
|
return gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, 0);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (sve_access_check(s)) {
|
|
||||||
gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, 0);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DO_ZPZ(NAME, name) \
|
#define DO_ZPZ(NAME, name) \
|
||||||
|
@ -986,20 +986,13 @@ static bool do_movz_zpz(DisasContext *s, int rd, int rn, int pg,
|
||||||
gen_helper_sve_movz_b, gen_helper_sve_movz_h,
|
gen_helper_sve_movz_b, gen_helper_sve_movz_h,
|
||||||
gen_helper_sve_movz_s, gen_helper_sve_movz_d,
|
gen_helper_sve_movz_s, gen_helper_sve_movz_d,
|
||||||
};
|
};
|
||||||
|
return gen_gvec_ool_zzp(s, fns[esz], rd, rn, pg, invert);
|
||||||
if (sve_access_check(s)) {
|
|
||||||
gen_gvec_ool_zzp(s, fns[esz], rd, rn, pg, invert);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool do_zpzi_ool(DisasContext *s, arg_rpri_esz *a,
|
static bool do_zpzi_ool(DisasContext *s, arg_rpri_esz *a,
|
||||||
gen_helper_gvec_3 *fn)
|
gen_helper_gvec_3 *fn)
|
||||||
{
|
{
|
||||||
if (sve_access_check(s)) {
|
return gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, a->imm);
|
||||||
gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, a->imm);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool trans_ASR_zpzi(DisasContext *s, arg_rpri_esz *a)
|
static bool trans_ASR_zpzi(DisasContext *s, arg_rpri_esz *a)
|
||||||
|
|
Loading…
Reference in New Issue