[PATCH 2/7] target/openrisc: Do not use target_ulong for @mr in MTSPR helper

Philippe Mathieu-Daudé posted 7 patches 1 month, 1 week ago
Maintainers: Stafford Horne <shorne@gmail.com>
There is a newer version of this series
[PATCH 2/7] target/openrisc: Do not use target_ulong for @mr in MTSPR helper
Posted by Philippe Mathieu-Daudé 1 month, 1 week 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>
---
 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 2/7] target/openrisc: Do not use target_ulong for @mr in MTSPR helper
Posted by Anton Johansson via 1 month, 1 week ago
On 08/10/25, 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>
> ---
>  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
> 

Reviewed-by: Anton Johansson <anjo@rev.ng>