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é <f4...@amsat.org>
> Signed-off-by: Richard Henderson <richard.hender...@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?

Reply via email to