qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 17/53] target/mips: convert to use format_state instead of


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 17/53] target/mips: convert to use format_state instead of dump_state
Date: Wed, 15 Sep 2021 09:04:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 9/14/21 4:20 PM, Daniel P. Berrangé wrote:
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  target/mips/cpu.c | 85 +++++++++++++++++++++++++----------------------
>  1 file changed, 45 insertions(+), 40 deletions(-)
> 
> diff --git a/target/mips/cpu.c b/target/mips/cpu.c
> index d426918291..9ced90d810 100644
> --- a/target/mips/cpu.c
> +++ b/target/mips/cpu.c
> @@ -42,76 +42,81 @@ const char regnames[32][3] = {
>      "t8", "t9", "k0", "k1", "gp", "sp", "s8", "ra",
>  };
>  
> -static void fpu_dump_fpr(fpr_t *fpr, FILE *f, bool is_fpu64)
> +static void fpu_dump_fpr(fpr_t *fpr, GString *buf, bool is_fpu64)
>  {
>      if (is_fpu64) {
> -        qemu_fprintf(f, "w:%08x d:%016" PRIx64 " fd:%13g fs:%13g psu: 
> %13g\n",
> -                     fpr->w[FP_ENDIAN_IDX], fpr->d,
> -                     (double)fpr->fd,
> -                     (double)fpr->fs[FP_ENDIAN_IDX],
> -                     (double)fpr->fs[!FP_ENDIAN_IDX]);
> +        g_string_append_printf(buf, "w:%08x d:%016" PRIx64
> +                               " fd:%13g fs:%13g psu: %13g\n",

IIUC QEMU coding style, the 2nd part of the format should be
aligned with the first part. (multiple occurrences in this series).

Otherwise:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>



reply via email to

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