[PATCH] target/loongarch: Enables plugins to get instruction codes

谭弘泽 posted 1 patch 1 year, 1 month ago
Failed in applying to current master (apply log)
There is a newer version of this series
target/loongarch/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] target/loongarch: Enables plugins to get instruction codes
Posted by 谭弘泽 1 year, 1 month ago
From 2b196a6e520bc42bb8dbbc569184fb3cdc3ae8f5 Mon Sep 17 00:00:00 2001
From: tanhongze <tanhongze@loongson.cn>
Date: Tue, 21 Mar 2023 20:43:46 +0800
Subject: [PATCH] target/loongarch: Enables plugins to get instruction codes

Signed-off-by: tanhongze <tanhongze@loongson.cn>
---
 target/loongarch/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/loongarch/translate.c b/target/loongarch/translate.c
index f443b5822f..21d86077f4 100644
--- a/target/loongarch/translate.c
+++ b/target/loongarch/translate.c
@@ -177,7 +177,7 @@ static void loongarch_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs)
     CPULoongArchState *env = cs->env_ptr;
     DisasContext *ctx = container_of(dcbase, DisasContext, base);
 
-    ctx->opcode = cpu_ldl_code(env, ctx->base.pc_next);
+    ctx->opcode = translator_ldl(env, &ctx->base, ctx->base.pc_next);
 
     if (!decode(ctx, ctx->opcode)) {
         qemu_log_mask(LOG_UNIMP, "Error: unknown opcode. "
--
2.34.1
Re: [PATCH] target/loongarch: Enables plugins to get instruction codes
Posted by Richard Henderson 1 year, 1 month ago
On 3/22/23 00:56, 谭弘泽 wrote:
> diff --git a/target/loongarch/translate.c b/target/loongarch/translate.c
> index f443b5822f..21d86077f4 100644
> --- a/target/loongarch/translate.c
> +++ b/target/loongarch/translate.c
> @@ -177,7 +177,7 @@ static void loongarch_tr_translate_insn(DisasContextBase *dcbase, 
> CPUState *cs)
>       CPULoongArchState *env = cs->env_ptr;
>       DisasContext *ctx = container_of(dcbase, DisasContext, base);
> 
> -    ctx->opcode = cpu_ldl_code(env, ctx->base.pc_next);
> +    ctx->opcode = translator_ldl(env, &ctx->base, ctx->base.pc_next);

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

r~