[PATCH 05/12] target/tricore: Remove unnecessary cast to target_ulong

Philippe Mathieu-Daudé posted 12 patches 1 month ago
Maintainers: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
[PATCH 05/12] target/tricore: Remove unnecessary cast to target_ulong
Posted by Philippe Mathieu-Daudé 1 month ago
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/tricore/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c
index 4f035b6f768..04319e107ba 100644
--- a/target/tricore/cpu.c
+++ b/target/tricore/cpu.c
@@ -37,7 +37,7 @@ static const gchar *tricore_gdb_arch_name(CPUState *cs)
 
 static void tricore_cpu_set_pc(CPUState *cs, vaddr value)
 {
-    cpu_env(cs)->PC = value & ~(target_ulong)1;
+    cpu_env(cs)->PC = value & ~1;
 }
 
 static vaddr tricore_cpu_get_pc(CPUState *cs)
-- 
2.51.0


Re: [PATCH 05/12] target/tricore: Remove unnecessary cast to target_ulong
Posted by Richard Henderson 1 month ago
On 10/9/25 22:21, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/tricore/cpu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c
> index 4f035b6f768..04319e107ba 100644
> --- a/target/tricore/cpu.c
> +++ b/target/tricore/cpu.c
> @@ -37,7 +37,7 @@ static const gchar *tricore_gdb_arch_name(CPUState *cs)
>   
>   static void tricore_cpu_set_pc(CPUState *cs, vaddr value)
>   {
> -    cpu_env(cs)->PC = value & ~(target_ulong)1;
> +    cpu_env(cs)->PC = value & ~1;
>   }
>   
>   static vaddr tricore_cpu_get_pc(CPUState *cs)

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

r~