From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v2 28/34] target/arm: Split gvec_fmla_idx_* for fmls and ah_fmls
Date: Fri, 31 Jan 2025 16:46:20 +0000 [thread overview]
Message-ID: <CAFEAcA8au1rLJdsB8iVKLN0N5eNP7twm=SCVb7zsLpHCqrDusg@mail.gmail.com> (raw)
In-Reply-To: <20250129013857.135256-29-richard.henderson@linaro.org>
On Wed, 29 Jan 2025 at 01:39, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Split negation cases out of gvec_fmla, creating 6 new helpers.
> We no longer pass 'neg' as a bit in simd_data.
>
> Handle FPCR.AH=0 via xor and FPCR.AH=1 via muladd flags.
> static bool do_fmla_vector_idx(DisasContext *s, arg_qrrx_e *a, bool neg)
> {
> - static gen_helper_gvec_4_ptr * const fns[3] = {
> - gen_helper_gvec_fmla_idx_h,
> - gen_helper_gvec_fmla_idx_s,
> - gen_helper_gvec_fmla_idx_d,
> + static gen_helper_gvec_4_ptr * const fns[3][3] = {
> + { gen_helper_gvec_fmla_idx_h,
> + gen_helper_gvec_fmla_idx_s,
> + gen_helper_gvec_fmla_idx_d },
> + { gen_helper_gvec_fmls_idx_h,
> + gen_helper_gvec_fmls_idx_s,
> + gen_helper_gvec_fmls_idx_d },
> + { gen_helper_gvec_ah_fmls_idx_h,
> + gen_helper_gvec_ah_fmls_idx_s,
> + gen_helper_gvec_ah_fmls_idx_d },
> };
> MemOp esz = a->esz;
> int check = fp_access_check_vector_hsd(s, a->q, esz);
> @@ -6756,8 +6762,7 @@ static bool do_fmla_vector_idx(DisasContext *s, arg_qrrx_e *a, bool neg)
>
> gen_gvec_op4_fpst(s, a->q, a->rd, a->rn, a->rm, a->rd,
> esz == MO_16 ? FPST_A64_F16 : FPST_A64,
> - (s->fpcr_ah << 5) | (a->idx << 1) | neg,
> - fns[esz - 1]);
> + a->idx, fns[esz - 1][neg ? 1 + s->fpcr_ah : 0]);
The indexes into fns[][] here are the wrong way around, so
if you try to do a FMLA on a double it hands you back
gen_helper_gvec_ah_fmls_idx_h ...
thanks
-- PMM
next prev parent reply other threads:[~2025-01-31 16:47 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 1:38 [PATCH v2 00/34] target/arm: FEAT_AFP followups for FEAT_SME2 Richard Henderson
2025-01-29 1:38 ` [PATCH v2 01/34] target/arm: Rename FPST_FPCR_A32 to FPST_A32 Richard Henderson
2025-01-29 17:41 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 02/34] target/arm: Rename FPST_FPCR_A64 to FPST_A64 Richard Henderson
2025-01-29 17:42 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 03/34] target/arm: Rename FPST_FPCR_F16_A32 to FPST_A32_F16 Richard Henderson
2025-01-29 17:42 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 04/34] target/arm: Rename FPST_FPCR_F16_A64 to FPST_A64_F16 Richard Henderson
2025-01-29 17:42 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 05/34] target/arm: Rename FPST_FPCR_AH* to FPST_AH* Richard Henderson
2025-01-29 17:42 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 06/34] target/arm: Introduce CPUARMState.vfp.fp_status[] Richard Henderson
2025-01-29 17:34 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 07/34] target/arm: Remove standard_fp_status_f16 Richard Henderson
2025-01-29 17:35 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 08/34] target/arm: Remove standard_fp_status Richard Henderson
2025-01-29 17:36 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 09/34] target/arm: Remove ah_fp_status_f16 Richard Henderson
2025-01-29 17:36 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 10/34] target/arm: Remove ah_fp_status Richard Henderson
2025-01-29 17:37 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 11/34] target/arm: Remove fp_status_f16_a64 Richard Henderson
2025-01-29 17:37 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 12/34] target/arm: Remove fp_status_f16_a32 Richard Henderson
2025-01-29 17:37 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 13/34] target/arm: Remove fp_status_a64 Richard Henderson
2025-01-29 17:37 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 14/34] target/arm: Remove fp_status_a32 Richard Henderson
2025-01-29 17:38 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 15/34] target/arm: Simplify fp_status indexing in mve_helper.c Richard Henderson
2025-01-29 17:39 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 16/34] target/arm: Simplify DO_VFP_cmp in vfp_helper.c Richard Henderson
2025-01-29 17:40 ` Philippe Mathieu-Daudé
2025-01-29 1:38 ` [PATCH v2 17/34] target/arm: Move float*_ah_chs to vec_internal.h Richard Henderson
2025-01-29 1:38 ` [PATCH v2 18/34] target/arm: Introduce float*_maybe_ah_chs Richard Henderson
2025-01-29 1:38 ` [PATCH v2 19/34] target/arm: Use float*_maybe_ah_chs in sve_ftssel_* Richard Henderson
2025-01-29 1:38 ` [PATCH v2 20/34] target/arm: Use float*_maybe_ah_chs in sve_fcadd_* Richard Henderson
2025-01-29 1:38 ` [PATCH v2 21/34] " Richard Henderson
2025-01-29 1:38 ` [PATCH v2 22/34] target/arm: Use flags for AH negation in do_fmla_zpzzz_* Richard Henderson
2025-01-29 1:38 ` [PATCH v2 23/34] target/arm: Use flags for AH negation in sve_ftmad_* Richard Henderson
2025-01-29 1:38 ` [PATCH v2 24/34] target/arm: Use flags for AH negation in float*_ah_mulsub_f Richard Henderson
2025-01-29 1:38 ` [PATCH v2 25/34] target/arm: Handle FPCR.AH in gvec_fcmla[hsd] Richard Henderson
2025-01-29 1:38 ` [PATCH v2 26/34] target/arm: Handle FPCR.AH in gvec_fcmla[hs]_idx Richard Henderson
2025-01-29 1:38 ` [PATCH v2 27/34] target/arm: Handle FPCR.AH in sve_fcmla_zpzzz_* Richard Henderson
2025-01-29 1:38 ` [PATCH v2 28/34] target/arm: Split gvec_fmla_idx_* for fmls and ah_fmls Richard Henderson
2025-01-31 16:46 ` Peter Maydell [this message]
2025-01-29 1:38 ` [PATCH v2 29/34] Revert "target/arm: Handle FPCR.AH in FMLSL" Richard Henderson
2025-01-29 1:38 ` [PATCH v2 30/34] target/arm: Handle FPCR.AH in gvec_fmlal_a64 Richard Henderson
2025-01-29 1:38 ` [PATCH v2 31/34] target/arm: Handle FPCR.AH in sve2_fmlal_zzxw_s Richard Henderson
2025-01-29 1:38 ` [PATCH v2 32/34] target/arm: Handle FPCR.AH in sve2_fmlal_zzzw_s Richard Henderson
2025-01-29 1:38 ` [PATCH v2 33/34] target/arm: Read fz16 from env->vfp.fpcr Richard Henderson
2025-01-29 1:38 ` [PATCH v2 34/34] target/arm: Sink fp_status and fpcr access into do_fmlal* Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFEAcA8au1rLJdsB8iVKLN0N5eNP7twm=SCVb7zsLpHCqrDusg@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).