From: Pedro Alves <palves@redhat.com>
To: Yao Qi <yao@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 3/3] MIPS: Provide FPU info and decode FCSR in `info float'
Date: Wed, 17 Dec 2014 10:53:00 -0000 [thread overview]
Message-ID: <5491609E.1080204@redhat.com> (raw)
In-Reply-To: <1418798765-23198-4-git-send-email-yao@codesourcery.com>
On 12/17/2014 06:46 AM, Yao Qi wrote:
> +static void
> +mips_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
> + struct frame_info *frame, const char *args)
> +{
> + int fcsr = mips_regnum (gdbarch)->fp_control_status;
> + enum mips_fpu_type type = MIPS_FPU_TYPE (gdbarch);
> + ULONGEST fcs = 0;
> + int i;
> +
> + if (fcsr == -1 || !deprecated_frame_register_read (frame, fcsr, NULL))
> + type = MIPS_FPU_NONE;
"deprecated" method usage alert. It's better to use methods that return
values and then print "<unsaved>", "<unavailable>" as appropriate,
though in this case you may be able to just use read_frame_register_unsigned
instead.
> +
> + fprintf_filtered (file, "fpu type: %s\n",
> + type == MIPS_FPU_DOUBLE ? "double-precision"
> + : type == MIPS_FPU_SINGLE ? "single-precision"
> + : "none / unused");
> +
> + if (type == MIPS_FPU_NONE)
> + return;
> +
Thanks,
Pedro Alves
next prev parent reply other threads:[~2014-12-17 10:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 6:46 [PATCH 0/3, V2] " Yao Qi
2014-12-17 6:46 ` [PATCH 2/3] Refactor gdbarch method print_float_info Yao Qi
2014-12-17 13:24 ` Pedro Alves
2014-12-18 1:02 ` Yao Qi
2014-12-18 11:14 ` Pedro Alves
2014-12-17 6:46 ` [PATCH 1/3] Remove h8300_print_float_info Yao Qi
2014-12-17 6:46 ` [PATCH 3/3] MIPS: Provide FPU info and decode FCSR in `info float' Yao Qi
2014-12-17 10:53 ` Pedro Alves [this message]
2014-12-17 12:40 ` Yao Qi
2014-12-18 1:07 ` Yao Qi
2014-12-18 11:16 ` Pedro Alves
2014-12-21 0:14 ` Maciej W. Rozycki
2014-12-18 12:52 ` [PATCH 0/3, V2] " Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5491609E.1080204@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox