mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
target/arm: Consistently use ARMFPRounding during translation
In preparation for extracting new helpers, ensure that the rounding mode is represented as ARMFPRounding and not FloatRoundMode. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
6ce21abd40
commit
97584f2bc8
3 changed files with 20 additions and 20 deletions
|
@ -4082,7 +4082,7 @@ TRANS_FEAT(FRINTX, aa64_sve, gen_gvec_fpst_arg_zpz, frintx_fns[a->esz],
|
|||
a, 0, a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR);
|
||||
|
||||
static bool do_frint_mode(DisasContext *s, arg_rpr_esz *a,
|
||||
int mode, gen_helper_gvec_3_ptr *fn)
|
||||
ARMFPRounding mode, gen_helper_gvec_3_ptr *fn)
|
||||
{
|
||||
unsigned vsz;
|
||||
TCGv_i32 tmode;
|
||||
|
@ -4096,7 +4096,7 @@ static bool do_frint_mode(DisasContext *s, arg_rpr_esz *a,
|
|||
}
|
||||
|
||||
vsz = vec_full_reg_size(s);
|
||||
tmode = tcg_const_i32(mode);
|
||||
tmode = tcg_const_i32(arm_rmode_to_sf(mode));
|
||||
status = fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR);
|
||||
|
||||
gen_helper_set_rmode(tmode, tmode, status);
|
||||
|
@ -4111,15 +4111,15 @@ static bool do_frint_mode(DisasContext *s, arg_rpr_esz *a,
|
|||
}
|
||||
|
||||
TRANS_FEAT(FRINTN, aa64_sve, do_frint_mode, a,
|
||||
float_round_nearest_even, frint_fns[a->esz])
|
||||
FPROUNDING_TIEEVEN, frint_fns[a->esz])
|
||||
TRANS_FEAT(FRINTP, aa64_sve, do_frint_mode, a,
|
||||
float_round_up, frint_fns[a->esz])
|
||||
FPROUNDING_POSINF, frint_fns[a->esz])
|
||||
TRANS_FEAT(FRINTM, aa64_sve, do_frint_mode, a,
|
||||
float_round_down, frint_fns[a->esz])
|
||||
FPROUNDING_NEGINF, frint_fns[a->esz])
|
||||
TRANS_FEAT(FRINTZ, aa64_sve, do_frint_mode, a,
|
||||
float_round_to_zero, frint_fns[a->esz])
|
||||
FPROUNDING_ZERO, frint_fns[a->esz])
|
||||
TRANS_FEAT(FRINTA, aa64_sve, do_frint_mode, a,
|
||||
float_round_ties_away, frint_fns[a->esz])
|
||||
FPROUNDING_TIEAWAY, frint_fns[a->esz])
|
||||
|
||||
static gen_helper_gvec_3_ptr * const frecpx_fns[] = {
|
||||
NULL, gen_helper_sve_frecpx_h,
|
||||
|
@ -7145,9 +7145,9 @@ TRANS_FEAT(FCVTLT_sd, aa64_sve2, gen_gvec_fpst_arg_zpz,
|
|||
gen_helper_sve2_fcvtlt_sd, a, 0, FPST_FPCR)
|
||||
|
||||
TRANS_FEAT(FCVTX_ds, aa64_sve2, do_frint_mode, a,
|
||||
float_round_to_odd, gen_helper_sve_fcvt_ds)
|
||||
FPROUNDING_ODD, gen_helper_sve_fcvt_ds)
|
||||
TRANS_FEAT(FCVTXNT_ds, aa64_sve2, do_frint_mode, a,
|
||||
float_round_to_odd, gen_helper_sve2_fcvtnt_ds)
|
||||
FPROUNDING_ODD, gen_helper_sve2_fcvtnt_ds)
|
||||
|
||||
static gen_helper_gvec_3_ptr * const flogb_fns[] = {
|
||||
NULL, gen_helper_flogb_h,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue