Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: twall@oculustech.com
Cc: gdb@sources.redhat.com
Subject: Re: ARM float/double conversion
Date: Wed, 05 Dec 2001 08:05:00 -0000	[thread overview]
Message-ID: <3C0E45B4.2090203@cygnus.com> (raw)
In-Reply-To: <3C0E3509.7EAF89EF@oculustech.com>

> In gdb/doublest.c, there is some conversion done for
> floatformat_littlebyte_bigword (currently only used by ARM):
> 
>           longswaps = fmt->totalsize / FLOATFORMAT_CHAR_BIT;
>           longswaps >>= 3;
> 
>           while (longswaps-- > 0)
>             {
>               /* This is ugly, but efficient */
>               *swapout++ = swapin[4];
>               *swapout++ = swapin[5];
>               *swapout++ = swapin[6];
>               *swapout++ = swapin[7];
>               *swapout++ = swapin[0];
>               *swapout++ = swapin[1];
>               *swapout++ = swapin[2];
>               *swapout++ = swapin[3];
>               swapin += 8;
>             }
> 
> What's odd is that fmt->totalsize can be either 64 or 96, based on the formats
> defined in libiberty/floatformat.c.  For either case, longswaps will be 1, so
> I don't understand why
> this code was "generalized".  I assume that the extended double on the ARM has
> just the
> first two 32-bit words swapped.

No.  I'm pretty sure the hardware engineers wouldn't have done that. I 
suspect instead that this is a long standing problem with cross 
debugging the Arm.  Anyone got an Arm spec available - my Arm book 
suggests the above is wrong but isn't 100% clear?

	Andrew



  reply	other threads:[~2001-12-05 16:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-05  6:54 Timothy Wall
2001-12-05  8:05 ` Andrew Cagney [this message]
2001-12-05  8:16   ` Richard Earnshaw
2001-12-05  9:36     ` Andrew Cagney

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=3C0E45B4.2090203@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb@sources.redhat.com \
    --cc=twall@oculustech.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