Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Richard.Earnshaw@arm.com
Cc: amichelotti@ipitec.it, Daniel Jacobowitz <drow@mvista.com>,
	Richard Earnshaw <rearnsha@arm.com>,
	gdb-patches@sources.redhat.com
Subject: Re: internal error reading f0-f7 registers in arm-elf targets.
Date: Mon, 28 Jul 2003 15:12:00 -0000	[thread overview]
Message-ID: <3F253D3F.8070603@redhat.com> (raw)
In-Reply-To: <200307280841.h6S8fLd03396@pc960.cambridge.arm.com>


> That's because 12 bytes are stored on the stack for each FP register.
> 
> This is all somewhat complicated.  The FPA has support for IEEE 
> extended-precision arithmetic, but it's never used by the compiler/ABI.  
> However, to ensure that register values are correctly preserved across 
> function calls and don't generate conversion traps in the prologue, they 
> have to be saved in either in extended precision or in internal format by 
> the prologue.  Old implementations of the FPE (the Emulator for the FPA) 
> did not have support for SFM instructions, so values were stored out in 
> extended precision (STFE), and that mode was configured not to trap on 
> conversion.  The FPA (and newer versions of the FPE) have the 
> store-float-multiple (SFM) which stores out the registers in their 
> internal form to guarantee that things won't trap.


> This all means that to correctly unwind floating point values we either 
> need to execute the LFM instructions (not generally possible in 
> remote/cross debugging) or understand the internal representation in use 
> (which isn't documented!).

The latter.

GDB already thinks it knows the answer: builtin_type_arm_ext_big or 
builtin_type_arm_ext_littlebyte_bigword.  If the on-stack format is 
going to be different to the target format then (in addition to from 
inflicting physical pain to the h/w designer) some playing with pseudo 
registers will be needed.

> To make things worse, some FPEs (eg the ARM-Linux one) use yet another 
> internal format... That is at least public, but it's just "different". :-(
> 
> And I haven't even mentioned the VFP yet!

I noticed that when looking for doco.  Finding anything on FPA10 / FPA11 
is hard - I eventually found something in the ARM7500FE manual.

Andrew



      reply	other threads:[~2003-07-28 15:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-25 11:33 Andrea Michelotti
2003-07-25 13:09 ` Daniel Jacobowitz
2003-07-25 13:40   ` Andrea Michelotti
2003-07-27 19:25     ` Andrew Cagney
2003-07-28  8:41       ` Richard Earnshaw
2003-07-28 15:12         ` 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=3F253D3F.8070603@redhat.com \
    --to=ac131313@redhat.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=amichelotti@ipitec.it \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=rearnsha@arm.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