From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20303 invoked by alias); 5 Dec 2001 16:05:12 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 20282 invoked from network); 5 Dec 2001 16:05:10 -0000 Received: from unknown (HELO localhost.cygnus.com) (24.114.42.213) by sources.redhat.com with SMTP; 5 Dec 2001 16:05:10 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.cygnus.com (Postfix) with ESMTP id 678E03E29; Wed, 5 Dec 2001 11:05:08 -0500 (EST) Message-ID: <3C0E45B4.2090203@cygnus.com> Date: Wed, 05 Dec 2001 08:05:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.3) Gecko/20011020 X-Accept-Language: en-us MIME-Version: 1.0 To: twall@oculustech.com Cc: gdb@sources.redhat.com Subject: Re: ARM float/double conversion References: <3C0E3509.7EAF89EF@oculustech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2001-12/txt/msg00030.txt.bz2 > 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