[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 21/38] tcg/tci: Implement the disassembler properly
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PULL 21/38] tcg/tci: Implement the disassembler properly |
Date: |
Sat, 15 May 2021 12:57:04 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
Hi Richard,
On 3/17/21 4:34 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.
>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> 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
> +/* Disassemble TCI bytecode. */
> +int print_insn_tci(bfd_vma addr, disassemble_info *info)
> +{
> + switch (op) {
> + case INDEX_op_br:
> + case INDEX_op_call:
> + case INDEX_op_exit_tb:
> + case INDEX_op_goto_tb:
> + tci_args_l(&tb_ptr, &ptr);
> + info->fprintf_func(info->stream, "%-12s %p", op_name, ptr);
> + break;
I just realized ptr can be NULL:
"tcg/tci: Implement goto_ptr"
The check in tcg_prologue_init is disabled because TCI does
want to use NULL to indicate exit, as opposed to branching to
a real epilogue.
What about adding str_ptr (similar to str_c/str_r) to pretty print
the NULL case?
- Re: [PULL 21/38] tcg/tci: Implement the disassembler properly,
Philippe Mathieu-Daudé <=