From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17758 invoked by alias); 28 Jul 2003 15:12:05 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 17748 invoked from network); 28 Jul 2003 15:12:05 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.131) by sources.redhat.com with SMTP; 28 Jul 2003 15:12:05 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id CDBEF2B7F; Mon, 28 Jul 2003 11:11:59 -0400 (EDT) Message-ID: <3F253D3F.8070603@redhat.com> Date: Mon, 28 Jul 2003 15:12:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Richard.Earnshaw@arm.com Cc: amichelotti@ipitec.it, Daniel Jacobowitz , Richard Earnshaw , gdb-patches@sources.redhat.com Subject: Re: internal error reading f0-f7 registers in arm-elf targets. References: <200307280841.h6S8fLd03396@pc960.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-07/txt/msg00493.txt.bz2 > 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