target/arm: Split out gen_gvec_fn_zz
Model the new function on gen_gvec_fn2 in translate-a64.c, but indicating which kind of register and in which order. Since there is only one user of do_vector2_z, fold it into do_mov_z. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20200815013145.539409-3-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
5be4dd043f
commit
f7d79c41fa
|
@ -143,15 +143,13 @@ static int pred_gvec_reg_size(DisasContext *s)
|
|||
}
|
||||
|
||||
/* Invoke a vector expander on two Zregs. */
|
||||
static bool do_vector2_z(DisasContext *s, GVecGen2Fn *gvec_fn,
|
||||
int esz, int rd, int rn)
|
||||
|
||||
static void gen_gvec_fn_zz(DisasContext *s, GVecGen2Fn *gvec_fn,
|
||||
int esz, int rd, int rn)
|
||||
{
|
||||
if (sve_access_check(s)) {
|
||||
unsigned vsz = vec_full_reg_size(s);
|
||||
gvec_fn(esz, vec_full_reg_offset(s, rd),
|
||||
vec_full_reg_offset(s, rn), vsz, vsz);
|
||||
}
|
||||
return true;
|
||||
unsigned vsz = vec_full_reg_size(s);
|
||||
gvec_fn(esz, vec_full_reg_offset(s, rd),
|
||||
vec_full_reg_offset(s, rn), vsz, vsz);
|
||||
}
|
||||
|
||||
/* Invoke a vector expander on three Zregs. */
|
||||
|
@ -170,7 +168,10 @@ static bool do_vector3_z(DisasContext *s, GVecGen3Fn *gvec_fn,
|
|||
/* Invoke a vector move on two Zregs. */
|
||||
static bool do_mov_z(DisasContext *s, int rd, int rn)
|
||||
{
|
||||
return do_vector2_z(s, tcg_gen_gvec_mov, 0, rd, rn);
|
||||
if (sve_access_check(s)) {
|
||||
gen_gvec_fn_zz(s, tcg_gen_gvec_mov, MO_8, rd, rn);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Initialize a Zreg with replications of a 64-bit immediate. */
|
||||
|
|
Loading…
Reference in a new issue