Re: [RFC PATCH 2/2] target/arm: Constify lot of helpers taking CPUARMState argument

2025-01-21 Thread Philippe Mathieu-Daudé
On 17/1/25 13:42, Daniel Henrique Barboza wrote: On 1/16/25 8:04 PM, 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é ---

Re: [RFC PATCH 2/2] target/arm: Constify lot of helpers taking CPUARMState argument

2025-01-17 Thread Philippe Mathieu-Daudé
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é --- I went via the "modify one and fix until it builds" pa

Re: [RFC PATCH 2/2] target/arm: Constify lot of helpers taking CPUARMState argument

2025-01-17 Thread Daniel Henrique Barboza
On 1/16/25 8:04 PM, 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é --- We should use 'const' more often in general IMO

[RFC PATCH 2/2] target/arm: Constify lot of helpers taking CPUARMState argument

2025-01-16 Thread Philippe Mathieu-Daudé
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é --- I went via the "modify one and fix until it builds" path, and the result seemed trivial enough, but can