Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Mark Kettenis <kettenis@chello.nl>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [commit] Add BE/LE floating-point type & format tables
Date: Tue, 24 Aug 2004 22:39:00 -0000	[thread overview]
Message-ID: <412BC367.7080906@gnu.org> (raw)
In-Reply-To: <200408091512.i79FCJfd000743@elgar.kettenis.dyndns.org>

>    Date: Sun, 08 Aug 2004 17:24:26 -0400
>    From: Andrew Cagney <cagney@gnu.org>
> 
>    My original post gave one example, here's another:
> 
>    static struct type *
>    mips_float_register_type (void)
>    {
>       if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
> 	return builtin_type_ieee_single_big;
>       else
> 	return builtin_type_ieee_single_little;
>    }
> 
>    Is all over the place.  This:
> 
> 	   builtin_type_ieee_single[gdbarch_byte_order (gdbarch)]
> 
>    is shorter and correct.
> 
> Ah OK.  But is this going to get used for some other target than MIPS?
> It seems to me that you're introducing a lot of machinery just to make
> life a bit easier there.

I've also fixed bugs where that if (...) logic was wrong.  I've a 
greater confidence in the correctness of this code.

 > Oh, and your code really needs to do some
> bounds checking too, so I really doubt whether it is much simpler.

?  The occasional assert (gdbarch_byte_order == BFD_ENDIAN_BIG || 
BFD_ENDIAN_LITTLE) might be interesting, but beyond that?



>    > Anyway, could we rename floatformat_ia64_quad to
>    > floatformat_ieee_quad.  There are quite a few systems out there that
>    > use or will be using the same format, and I believe i will be in a new
>    > revision of the official IEEE standard for it.
>    > 
> 
>    local to gdb?
> 
> Whatever.

Andrew



      reply	other threads:[~2004-08-24 22:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-08 17:23 Andrew Cagney
2004-08-08 19:51 ` Mark Kettenis
2004-08-09 13:58   ` Andrew Cagney
2004-08-09 15:12     ` Mark Kettenis
2004-08-24 22:39       ` Andrew Cagney [this message]

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=412BC367.7080906@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kettenis@chello.nl \
    /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