[PATCH v2 04/10] target/openrisc: Do not use target_ulong for @mr in MTSPR helper

Philippe Mathieu-Daudé posted 10 patches 1 month ago
Maintainers: Stafford Horne <shorne@gmail.com>
There is a newer version of this series
[PATCH v2 04/10] target/openrisc: Do not use target_ulong for @mr in MTSPR helper
Posted by Philippe Mathieu-Daudé 1 month ago
OpenRISCTLBEntry::@mr field is a uint32_t type since its
introduction in commit 726fe045720 ("target-or32: Add MMU support").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
---
 target/openrisc/sys_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c
index b091a9c6685..ad59939db3b 100644
--- a/target/openrisc/sys_helper.c
+++ b/target/openrisc/sys_helper.c
@@ -45,7 +45,7 @@ void HELPER(mtspr)(CPUOpenRISCState *env, target_ulong spr, target_ulong rb)
     OpenRISCCPU *cpu = env_archcpu(env);
 #ifndef CONFIG_USER_ONLY
     CPUState *cs = env_cpu(env);
-    target_ulong mr;
+    uint32_t mr;
     int idx;
 #endif
 
-- 
2.51.0


Re: [PATCH v2 04/10] target/openrisc: Do not use target_ulong for @mr in MTSPR helper
Posted by Richard Henderson 1 month ago
On 10/9/25 01:18, Philippe Mathieu-Daudé wrote:
> OpenRISCTLBEntry::@mr field is a uint32_t type since its
> introduction in commit 726fe045720 ("target-or32: Add MMU support").
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Anton Johansson <anjo@rev.ng>
> ---
>   target/openrisc/sys_helper.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c
> index b091a9c6685..ad59939db3b 100644
> --- a/target/openrisc/sys_helper.c
> +++ b/target/openrisc/sys_helper.c
> @@ -45,7 +45,7 @@ void HELPER(mtspr)(CPUOpenRISCState *env, target_ulong spr, target_ulong rb)
>       OpenRISCCPU *cpu = env_archcpu(env);
>   #ifndef CONFIG_USER_ONLY
>       CPUState *cs = env_cpu(env);
> -    target_ulong mr;
> +    uint32_t mr;
>       int idx;
>   #endif
>   

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

r~