[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 21/57] tcg/tci: Implement the disassembler properly
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v5 21/57] tcg/tci: Implement the disassembler properly |
Date: |
Wed, 17 Mar 2021 01:38:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 |
On 3/11/21 3:39 PM, Richard Henderson wrote:
> Actually print arguments as opposed to simply the opcodes
> and, uselessly, the argument counts. Reuse all of the helpers
> developed as part of the interpreter.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> meson.build | 2 +-
> include/tcg/tcg-opc.h | 2 -
> disas/tci.c | 61 ---------
> tcg/tci.c | 283 ++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 284 insertions(+), 64 deletions(-)
> delete mode 100644 disas/tci.c
> +#if TCG_TARGET_REG_BITS == 32
> + case INDEX_op_setcond2_i32:
> + tci_args_rrrrrc(&tb_ptr, &r0, &r1, &r2, &r3, &r4, &c);
> + info->fprintf_func(info->stream, "%-12s %s,%s,%s,%s,%s,%s",
> + op_name, str_r(r0), str_r(r1), str_r(r2),
> + str_r(r3), str_r(r4), str_c(c));
> + break;
> +
> + case INDEX_op_brcond2_i32:
> + tci_args_rrrrcl(&tb_ptr, &r0, &r1, &r2, &r3, &c, &ptr);
> + info->fprintf_func(info->stream, "%-12s %s,%s,%s,%s,%s,%p",
> + op_name, str_r(r0), str_r(r1),
> + str_r(r2), str_r(r3), str_c(c), ptr);
> + break;
> +
> + case INDEX_op_mulu2_i32:
> + tci_args_rrrr(&tb_ptr, &r0, &r1, &r2, &r3);
> + info->fprintf_func(info->stream, "%-12s %s,%s,%s,%s",
> + op_name, str_r(r0), str_r(r1),
> + str_r(r2), str_r(r3));
> + break;
> +
> + case INDEX_op_add2_i32:
> + case INDEX_op_sub2_i32:
> + tci_args_rrrrrr(&tb_ptr, &r0, &r1, &r2, &r3, &r4, &r5);
> + info->fprintf_func(info->stream, "%-12s %s,%s,%s,%s,%s,%s",
> + op_name, str_r(r0), str_r(r1), str_r(r2),
> + str_r(r3), str_r(r4), str_r(r5));
> + break;
> +#endif
One single comment, I'd add one space after each comma in
format arguments to make output less compact. Matter of
taste probably.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
- Re: [PATCH v5 19/57] tcg/tci: Hoist op_size checking into tci_args_*, (continued)
- [PATCH v5 20/57] tcg/tci: Remove tci_disas, Richard Henderson, 2021/03/11
- [PATCH v5 24/57] tcg/tci: Improve tcg_target_call_clobber_regs, Richard Henderson, 2021/03/11
- [PATCH v5 16/57] tcg/tci: Clean up deposit operations, Richard Henderson, 2021/03/11
- [PATCH v5 22/57] tcg: Build ffi data structures for helpers, Richard Henderson, 2021/03/11
- [PATCH v5 21/57] tcg/tci: Implement the disassembler properly, Richard Henderson, 2021/03/11
- Re: [PATCH v5 21/57] tcg/tci: Implement the disassembler properly,
Philippe Mathieu-Daudé <=
- [PATCH v5 25/57] tcg/tci: Move call-return regs to end of tcg_target_reg_alloc_order, Richard Henderson, 2021/03/11
- [PATCH v5 23/57] tcg/tci: Use ffi for calls, Richard Henderson, 2021/03/11
- [PATCH v5 28/57] tcg/tci: Split out tcg_out_op_l, Richard Henderson, 2021/03/11
- [PATCH v5 27/57] tcg/tci: Split out tcg_out_op_rrs, Richard Henderson, 2021/03/11
- [PATCH v5 26/57] tcg/tci: Push opcode emit into each case, Richard Henderson, 2021/03/11
- [PATCH v5 34/57] tcg/tci: Split out tcg_out_op_rrrbb, Richard Henderson, 2021/03/11