mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
target/loongarch: Disassemble jirl properly
While jirl shares the same instruction format as bne etc, it is not assembled the same. In particular, rd is printed first not second and the immediate is not pc-relative. Decode into the arg_rr_i structure, which prints correctly. This changes the "offs" member to "imm", to update translate. Reviewed-by: WANG Xuerui <git@xen0n.name> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
2e0d91513d
commit
c2b618a8c1
3 changed files with 4 additions and 3 deletions
|
@ -23,7 +23,7 @@ static bool trans_jirl(DisasContext *ctx, arg_jirl *a)
|
|||
TCGv dest = gpr_dst(ctx, a->rd, EXT_NONE);
|
||||
TCGv src1 = gpr_src(ctx, a->rj, EXT_NONE);
|
||||
|
||||
tcg_gen_addi_tl(cpu_pc, src1, a->offs);
|
||||
tcg_gen_addi_tl(cpu_pc, src1, a->imm);
|
||||
tcg_gen_movi_tl(dest, ctx->base.pc_next + 4);
|
||||
gen_set_gpr(a->rd, dest, EXT_NONE);
|
||||
tcg_gen_lookup_and_goto_ptr();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue