[PATCH 1/6] target/sh4: Convert CPUSH4State::sr register to uint32_t type

Philippe Mathieu-Daudé posted 6 patches 4 months ago
Maintainers: Yoshinori Sato <yoshinori.sato@nifty.com>
[PATCH 1/6] target/sh4: Convert CPUSH4State::sr register to uint32_t type
Posted by Philippe Mathieu-Daudé 4 months ago
Since its introduction in commit fdf9b3e831e the %SR register
is a uint32_t type.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/sh4/cpu.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h
index c41ab70dd7c..db27a693f12 100644
--- a/target/sh4/cpu.h
+++ b/target/sh4/cpu.h
@@ -365,14 +365,14 @@ static inline int cpu_ptel_pr (uint32_t ptel)
 #define PTEA_TC        (1 << 3)
 #define cpu_ptea_tc(ptea) (((ptea) & PTEA_TC) >> 3)
 
-static inline target_ulong cpu_read_sr(CPUSH4State *env)
+static inline uint32_t cpu_read_sr(CPUSH4State *env)
 {
     return env->sr | (env->sr_m << SR_M) |
                      (env->sr_q << SR_Q) |
                      (env->sr_t << SR_T);
 }
 
-static inline void cpu_write_sr(CPUSH4State *env, target_ulong sr)
+static inline void cpu_write_sr(CPUSH4State *env, uint32_t sr)
 {
     env->sr_m = (sr >> SR_M) & 1;
     env->sr_q = (sr >> SR_Q) & 1;
-- 
2.51.0


Re: [PATCH 1/6] target/sh4: Convert CPUSH4State::sr register to uint32_t type
Posted by Anton Johansson via 4 months ago
On 08/10/25, Philippe Mathieu-Daudé wrote:
> Since its introduction in commit fdf9b3e831e the %SR register
> is a uint32_t type.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  target/sh4/cpu.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
 
Reviewed-by: Anton Johansson <anjo@rev.ng>