qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	 Peter Maydell <peter.maydell@linaro.org>,
	Richard Henderson <richard.henderson@linaro.org>,
	 Andrew Jeffery <andrew@aj.id.au>
Subject: Re: [PATCH 1/2] target/arm: Disable VFPv4-D32 when NEON is not available
Date: Wed, 28 Sep 2022 23:00:21 +0000	[thread overview]
Message-ID: <CACPK8XeiadO=ACQdpFmvy5cAGe0C_LzC3ZPjPVMs_22bUDTcFg@mail.gmail.com> (raw)
In-Reply-To: <20220928164719.655586-2-clg@kaod.org>

On Wed, 28 Sept 2022 at 16:47, Cédric Le Goater <clg@kaod.org> wrote:
>
> As the Cortex A7 MPCore Technical reference says :
>
>   "When FPU option is selected without NEON, the FPU is VFPv4-D16 and
>   uses 16 double-precision registers. When the FPU is implemented with
>   NEON, the FPU is VFPv4-D32 and uses 32 double-precision registers.
>   This register bank is shared with NEON."
>
> Modify the mvfr0 register value of the cortex A7 to advertise only 16
> registers when NEON is not available, and not 32 registers.
>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>



> ---
>  target/arm/cpu.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/target/arm/cpu.c b/target/arm/cpu.c
> index 7ec3281da9aa..01dc74c32add 100644
> --- a/target/arm/cpu.c
> +++ b/target/arm/cpu.c
> @@ -1684,6 +1684,10 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
>          cpu->isar.id_isar6 = u;
>
>          if (!arm_feature(env, ARM_FEATURE_M)) {

Can you explain why the test is put behind the !ARM_FEATURE_M check?

Reviewed-by: Joel Stanley <joel@jms.id.au>

> +            u = cpu->isar.mvfr0;
> +            u = FIELD_DP32(u, MVFR0, SIMDREG, 1); /* 16 registers */
> +            cpu->isar.mvfr0 = u;
> +
>              u = cpu->isar.mvfr1;
>              u = FIELD_DP32(u, MVFR1, SIMDLS, 0);
>              u = FIELD_DP32(u, MVFR1, SIMDINT, 0);
> --
> 2.37.3
>


  parent reply	other threads:[~2022-09-28 23:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28 16:47 [PATCH 0/2] ast2600: Disable NEON and VFPv4-D32 Cédric Le Goater
2022-09-28 16:47 ` [PATCH 1/2] target/arm: Disable VFPv4-D32 when NEON is not available Cédric Le Goater
2022-09-28 17:21   ` Richard Henderson
2022-09-28 23:00   ` Joel Stanley [this message]
2022-09-29  7:20     ` Cédric Le Goater
2022-09-29 11:48       ` Peter Maydell
2022-09-29 11:44   ` Peter Maydell
2022-09-29 15:22     ` Richard Henderson
2022-09-29 15:29       ` Peter Maydell
2022-09-30 14:59     ` Cédric Le Goater
2022-09-30 15:10       ` Peter Maydell
2022-09-28 16:47 ` [PATCH 2/2] ast2600: Drop NEON from the CPU features Cédric Le Goater
2022-09-29  2:09   ` Joel Stanley

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='CACPK8XeiadO=ACQdpFmvy5cAGe0C_LzC3ZPjPVMs_22bUDTcFg@mail.gmail.com' \
    --to=joel@jms.id.au \
    --cc=andrew@aj.id.au \
    --cc=clg@kaod.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.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).