From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
Peter Maydell <peter.maydell@linaro.org>,
Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [RFC PATCH 2/2] target/arm: Constify lot of helpers taking CPUARMState argument
Date: Fri, 17 Jan 2025 17:34:25 +0100 [thread overview]
Message-ID: <6b7da4ca-eafc-4a02-86e8-6de59628ccfc@linaro.org> (raw)
In-Reply-To: <20250116230435.87580-3-philmd@linaro.org>
On 17/1/25 00:04, Philippe Mathieu-Daudé wrote:
> When methods don't modify the CPUARMState* argument,
> we can mark it const. This allow enforcing places where
> the CPU env shouldn't be modified at all,
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> I went via the "modify one and fix until it builds" path,
> and the result seemed trivial enough, but can try to split
> if requested.
Re-reading me again, this sounds like a random patch, which isn't :)
What I meant is I made const the functions that I want to use
with a Const CPUState*, then I built and fixed the call sites.
> ---
> target/arm/cpu-features.h | 2 +-
> target/arm/cpu.h | 71 ++++++++++++++++++++-------------------
> target/arm/internals.h | 10 +++---
> target/arm/helper.c | 25 +++++++-------
> target/arm/ptw.c | 2 +-
> target/arm/tcg/m_helper.c | 8 ++---
> target/arm/vfp_helper.c | 6 ++--
> 7 files changed, 63 insertions(+), 61 deletions(-)
prev parent reply other threads:[~2025-01-17 16:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 23:04 [RFC PATCH 0/2] target/arm: Constify helpers taking CPUARMState arg Philippe Mathieu-Daudé
2025-01-16 23:04 ` [RFC PATCH 1/2] cpus: Introduce const_cpu_env() and const_env_archcpu() Philippe Mathieu-Daudé
2025-01-17 12:39 ` Daniel Henrique Barboza
2025-01-16 23:04 ` [RFC PATCH 2/2] target/arm: Constify lot of helpers taking CPUARMState argument Philippe Mathieu-Daudé
2025-01-17 12:42 ` Daniel Henrique Barboza
2025-01-22 7:07 ` Philippe Mathieu-Daudé
2025-01-17 16:34 ` Philippe Mathieu-Daudé [this message]
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=6b7da4ca-eafc-4a02-86e8-6de59628ccfc@linaro.org \
--to=philmd@linaro.org \
--cc=dbarboza@ventanamicro.com \
--cc=pbonzini@redhat.com \
--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).