[PATCH 01/12] target/tricore: Remove target_ulong use in gen_goto_tb()

Philippe Mathieu-Daudé posted 12 patches 1 month ago
Maintainers: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
[PATCH 01/12] target/tricore: Remove target_ulong use in gen_goto_tb()
Posted by Philippe Mathieu-Daudé 1 month ago
translator_use_goto_tb() expects a vaddr type since commit
b1c09220b4c ("accel/tcg: Replace target_ulong with vaddr in
translator_*()").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/tricore/translate.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/tricore/translate.c b/target/tricore/translate.c
index 7c6e3095971..dd09f0651f5 100644
--- a/target/tricore/translate.c
+++ b/target/tricore/translate.c
@@ -72,7 +72,8 @@ static const char *regnames_d[] = {
 
 typedef struct DisasContext {
     DisasContextBase base;
-    target_ulong pc_succ_insn;
+
+    vaddr pc_succ_insn;
     uint32_t opcode;
     /* Routine used to access memory */
     int mem_idx;
@@ -2811,13 +2812,12 @@ static void gen_calc_usb_mulr_h(TCGv arg)
 
 /* helpers for generating program flow micro-ops */
 
-static inline void gen_save_pc(target_ulong pc)
+static inline void gen_save_pc(vaddr pc)
 {
     tcg_gen_movi_tl(cpu_PC, pc);
 }
 
-static void gen_goto_tb(DisasContext *ctx, unsigned tb_slot_index,
-                        target_ulong dest)
+static void gen_goto_tb(DisasContext *ctx, unsigned tb_slot_index, vaddr dest)
 {
     if (translator_use_goto_tb(&ctx->base, dest)) {
         tcg_gen_goto_tb(tb_slot_index);
-- 
2.51.0


Re: [PATCH 01/12] target/tricore: Remove target_ulong use in gen_goto_tb()
Posted by Richard Henderson 1 month ago
On 10/9/25 22:21, Philippe Mathieu-Daudé wrote:
> translator_use_goto_tb() expects a vaddr type since commit
> b1c09220b4c ("accel/tcg: Replace target_ulong with vaddr in
> translator_*()").
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/tricore/translate.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/target/tricore/translate.c b/target/tricore/translate.c
> index 7c6e3095971..dd09f0651f5 100644
> --- a/target/tricore/translate.c
> +++ b/target/tricore/translate.c
> @@ -72,7 +72,8 @@ static const char *regnames_d[] = {
>   
>   typedef struct DisasContext {
>       DisasContextBase base;
> -    target_ulong pc_succ_insn;
> +
> +    vaddr pc_succ_insn;
>       uint32_t opcode;
>       /* Routine used to access memory */
>       int mem_idx;
> @@ -2811,13 +2812,12 @@ static void gen_calc_usb_mulr_h(TCGv arg)
>   
>   /* helpers for generating program flow micro-ops */
>   
> -static inline void gen_save_pc(target_ulong pc)
> +static inline void gen_save_pc(vaddr pc)
>   {
>       tcg_gen_movi_tl(cpu_PC, pc);
>   }
>   
> -static void gen_goto_tb(DisasContext *ctx, unsigned tb_slot_index,
> -                        target_ulong dest)
> +static void gen_goto_tb(DisasContext *ctx, unsigned tb_slot_index, vaddr dest)
>   {
>       if (translator_use_goto_tb(&ctx->base, dest)) {
>           tcg_gen_goto_tb(tb_slot_index);

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

r~