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

tanhongze posted 1 patch 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230330124600.1523026-1-tanhongze@loongson.cn
Maintainers: Song Gao <gaosong@loongson.cn>, Xiaojuan Yang <yangxiaojuan@loongson.cn>
target/loongarch/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v2] target/loongarch: Enables plugins to get instruction codes
Posted by tanhongze 1 year, 1 month ago
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 3bb63bfb3e..50d6b62f39 100644
--- a/target/loongarch/translate.c
+++ b/target/loongarch/translate.c
@@ -198,7 +198,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 v2] target/loongarch: Enables plugins to get instruction codes
Posted by Alex Bennée 1 year, 1 month ago
tanhongze <tanhongze@loongson.cn> writes:

> Signed-off-by: tanhongze <tanhongze@loongson.cn>

It looks like you've missed the review tags from the last posting.

Acked-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  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 3bb63bfb3e..50d6b62f39 100644
> --- a/target/loongarch/translate.c
> +++ b/target/loongarch/translate.c
> @@ -198,7 +198,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. "


-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro