mirror of https://github.com/xemu-project/xemu.git
target/arm: Rename do_zzz_fp to gen_gvec_ool_fpst_arg_zzz
Rename the function to match gen_gvec_ool_arg_zzz, and move to be adjacent. Split out gen_gvec_fpst_zzz as a helper while we're at it. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220527181907.189259-86-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
698ddb9d02
commit
532724e439
|
@ -175,6 +175,35 @@ static bool gen_gvec_ool_arg_zzz(DisasContext *s, gen_helper_gvec_3 *fn,
|
|||
return gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, data);
|
||||
}
|
||||
|
||||
/* Invoke an out-of-line helper on 3 Zregs, plus float_status. */
|
||||
static bool gen_gvec_fpst_zzz(DisasContext *s, gen_helper_gvec_3_ptr *fn,
|
||||
int rd, int rn, int rm,
|
||||
int data, ARMFPStatusFlavour flavour)
|
||||
{
|
||||
if (fn == NULL) {
|
||||
return false;
|
||||
}
|
||||
if (sve_access_check(s)) {
|
||||
unsigned vsz = vec_full_reg_size(s);
|
||||
TCGv_ptr status = fpstatus_ptr(flavour);
|
||||
|
||||
tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, rd),
|
||||
vec_full_reg_offset(s, rn),
|
||||
vec_full_reg_offset(s, rm),
|
||||
status, vsz, vsz, data, fn);
|
||||
|
||||
tcg_temp_free_ptr(status);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool gen_gvec_fpst_arg_zzz(DisasContext *s, gen_helper_gvec_3_ptr *fn,
|
||||
arg_rrr_esz *a, int data)
|
||||
{
|
||||
return gen_gvec_fpst_zzz(s, fn, a->rd, a->rn, a->rm, data,
|
||||
a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR);
|
||||
}
|
||||
|
||||
/* Invoke an out-of-line helper on 4 Zregs. */
|
||||
static bool gen_gvec_ool_zzzz(DisasContext *s, gen_helper_gvec_4 *fn,
|
||||
int rd, int rn, int rm, int ra, int data)
|
||||
|
@ -3769,25 +3798,6 @@ static bool trans_FADDA(DisasContext *s, arg_rprr_esz *a)
|
|||
*** SVE Floating Point Arithmetic - Unpredicated Group
|
||||
*/
|
||||
|
||||
static bool do_zzz_fp(DisasContext *s, arg_rrr_esz *a,
|
||||
gen_helper_gvec_3_ptr *fn)
|
||||
{
|
||||
if (fn == NULL) {
|
||||
return false;
|
||||
}
|
||||
if (sve_access_check(s)) {
|
||||
unsigned vsz = vec_full_reg_size(s);
|
||||
TCGv_ptr status = fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR);
|
||||
tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, a->rd),
|
||||
vec_full_reg_offset(s, a->rn),
|
||||
vec_full_reg_offset(s, a->rm),
|
||||
status, vsz, vsz, 0, fn);
|
||||
tcg_temp_free_ptr(status);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#define DO_FP3(NAME, name) \
|
||||
static bool trans_##NAME(DisasContext *s, arg_rrr_esz *a) \
|
||||
{ \
|
||||
|
@ -3795,7 +3805,7 @@ static bool trans_##NAME(DisasContext *s, arg_rrr_esz *a) \
|
|||
NULL, gen_helper_gvec_##name##_h, \
|
||||
gen_helper_gvec_##name##_s, gen_helper_gvec_##name##_d \
|
||||
}; \
|
||||
return do_zzz_fp(s, a, fns[a->esz]); \
|
||||
return gen_gvec_fpst_arg_zzz(s, fns[a->esz], a, 0); \
|
||||
}
|
||||
|
||||
DO_FP3(FADD_zzz, fadd)
|
||||
|
|
Loading…
Reference in New Issue