qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 6/8] target/arm: Prepare bfdotadd() callers for FEAT_EBF supp


From: Richard Henderson
Subject: Re: [PATCH 6/8] target/arm: Prepare bfdotadd() callers for FEAT_EBF support
Date: Wed, 31 Jul 2024 11:43:13 +1000
User-agent: Mozilla Thunderbird

On 7/31/24 02:03, Peter Maydell wrote:
We use bfdotadd() in four callsites for various helper functions. Currently
this all assumes that we have the FPCR.EBF=0 semantics. For FPCR.EBF=1
we will need to:
  * call a different routine to bfdotadd() because we need to do a
    fused multiply-add rather than separate multiply and add steps
  * use a different float_status that honours the FPCR rounding mode
    and denormal-flushing fields
  * pass in an extra float_status that has been set up to perform
    round-to-odd rounding

To prepare for this, refactor all the callsites so that instead of
    for (...) {
        x = bfdotadd(...);
    }

they are:
    float_status fpst, fpst_odd;
    if (is_ebf(env, &fpst, &fpst_odd)) {
        for (...) {
            x = bfdotadd_ebf(..., &fpst, &fpst_odd);
        }
    } else {
        for (...) {
            x = bfdotadd(..., &fpst);
        }
    }

For the moment the is_ebf() function always returns false, sets up
fpst for EBF=0 semantics and never sets up fpst_odd; bfdotadd_ebf()
will assert if called. We'll fill in the handling for EBF=1 in the
next commit.

This change should be a zero-behaviour-change refactor.

Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
---
  target/arm/tcg/vec_internal.h |  37 ++++++++-
  target/arm/tcg/sme_helper.c   |  74 ++++++++++++------
  target/arm/tcg/vec_helper.c   | 141 +++++++++++++++++++++++++---------
  3 files changed, 192 insertions(+), 60 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]