qemu-devel
[Top][All Lists]
Advanced

[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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]