[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 2/2] target/arm: Constify lot of helpers taking CPUARMSta
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [RFC PATCH 2/2] target/arm: Constify lot of helpers taking CPUARMState argument |
Date: |
Fri, 17 Jan 2025 17:34:25 +0100 |
User-agent: |
Mozilla Thunderbird |
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(-)