Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC][03/19] Target FP: Complete tdep move to convert_typed_floating
Date: Wed, 20 Sep 2017 07:35:00 -0000	[thread overview]
Message-ID: <d373c5f9a2573e564f3ae31548f25324@polymtl.ca> (raw)
In-Reply-To: <20170905182045.22009D8086F@oc3748833570.ibm.com>

On 2017-09-05 20:20, Ulrich Weigand wrote:
> [RFC][03/19] Target FP: Complete tdep move to convert_typed_floating
> 
> Many tdep files need to perform conversions between two floating-point
> types, usually when accessing FP registers.  Most targets now use the
> convert_typed_floating helper routine to do so.  However, a small 
> number
> still use the old method of converting via a DOUBLEST.  Since we want
> to get rid of DOUBLEST, these targets need to be moves to the new
> method as well.
> 
> The main obstacle is that for convert_typed_floating we need an actual
> *type*, not just a floatformat.
> 
> In arm-tdep.c, this is very straightforward, since there is already a
> type using the ARM extended floatformat.
> 
> For sh-tdep.c and sh64-tdep.c, no such type already exists, so I've
> added one to the gdbarch_tdep struct as done on other targets.

So far the patches look like good cleanups on their own own, 
independently of the rest of the series.

> Index: binutils-gdb/gdb/sh-tdep.c
> ===================================================================
> --- binutils-gdb.orig/gdb/sh-tdep.c
> +++ binutils-gdb/gdb/sh-tdep.c
> @@ -33,7 +33,6 @@
>  #include "dis-asm.h"
>  #include "inferior.h"
>  #include "arch-utils.h"
> -#include "floatformat.h"
>  #include "regcache.h"
>  #include "doublest.h"
>  #include "osabi.h"
> @@ -1552,6 +1551,19 @@ sh_register_reggroup_p (struct gdbarch *
>     The other pseudo registers (the FVs) also don't pose a problem
>     because they are stored as 4 individual FP elements.  */
> 
> +static struct type *
> +sh_littlebyte_bigword_type (struct gdbarch *gdbarch)
> +{
> +  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
> +
> +  if (!tdep->sh_littlebyte_bigword_type)

Nit, use == NULL.

> +    tdep->sh_littlebyte_bigword_type
> +      = arch_float_type (gdbarch, -1, 
> "builtin_type_sh_littlebyte_bigword",
> +                         floatformats_arm_ext);

This refers to arm, is it right?

Same comments for sh64.

Thanks,

Simon


  reply	other threads:[~2017-09-20  7:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05 18:20 Ulrich Weigand
2017-09-20  7:35 ` Simon Marchi [this message]
2017-09-20 16:33   ` Ulrich Weigand
2017-09-27 17:09     ` Ulrich Weigand

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=d373c5f9a2573e564f3ae31548f25324@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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