[PATCH 2/4] target/loongarch: Remove target_ulong use in gen_goto_tb()

Philippe Mathieu-Daudé posted 4 patches 1 month ago
Maintainers: Song Gao <gaosong@loongson.cn>, Bibo Mao <maobibo@loongson.cn>, Jiaxun Yang <jiaxun.yang@flygoat.com>
[PATCH 2/4] target/loongarch: 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/loongarch/tcg/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/loongarch/tcg/translate.c b/target/loongarch/tcg/translate.c
index 53a0b4c3ce9..e30b64c0e05 100644
--- a/target/loongarch/tcg/translate.c
+++ b/target/loongarch/tcg/translate.c
@@ -99,7 +99,7 @@ void generate_exception(DisasContext *ctx, int excp)
     ctx->base.is_jmp = DISAS_NORETURN;
 }
 
-static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
+static inline void gen_goto_tb(DisasContext *ctx, int n, vaddr dest)
 {
     if (ctx->va32) {
         dest = (uint32_t) dest;
-- 
2.51.0


Re: [PATCH 2/4] target/loongarch: Remove target_ulong use in gen_goto_tb()
Posted by gaosong 1 month ago
在 2025/10/10 上午4:19, Philippe Mathieu-Daudé 写道:
> 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/loongarch/tcg/translate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Song Gao <gaosong@loongson.cn>

Thanks.
Song Gao
> diff --git a/target/loongarch/tcg/translate.c b/target/loongarch/tcg/translate.c
> index 53a0b4c3ce9..e30b64c0e05 100644
> --- a/target/loongarch/tcg/translate.c
> +++ b/target/loongarch/tcg/translate.c
> @@ -99,7 +99,7 @@ void generate_exception(DisasContext *ctx, int excp)
>       ctx->base.is_jmp = DISAS_NORETURN;
>   }
>   
> -static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
> +static inline void gen_goto_tb(DisasContext *ctx, int n, vaddr dest)
>   {
>       if (ctx->va32) {
>           dest = (uint32_t) dest;


Re: [PATCH 2/4] target/loongarch: Remove target_ulong use in gen_goto_tb()
Posted by Richard Henderson 1 month ago
On 10/9/25 13:19, 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/loongarch/tcg/translate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/loongarch/tcg/translate.c b/target/loongarch/tcg/translate.c
> index 53a0b4c3ce9..e30b64c0e05 100644
> --- a/target/loongarch/tcg/translate.c
> +++ b/target/loongarch/tcg/translate.c
> @@ -99,7 +99,7 @@ void generate_exception(DisasContext *ctx, int excp)
>       ctx->base.is_jmp = DISAS_NORETURN;
>   }
>   
> -static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
> +static inline void gen_goto_tb(DisasContext *ctx, int n, vaddr dest)
>   {
>       if (ctx->va32) {
>           dest = (uint32_t) dest;

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

r~