From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CxbBF-0003Iz-EU for qemu-devel@nongnu.org; Sat, 05 Feb 2005 20:25:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CxbB0-0003CX-Cm for qemu-devel@nongnu.org; Sat, 05 Feb 2005 20:25:28 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxbAy-00039c-W8 for qemu-devel@nongnu.org; Sat, 05 Feb 2005 20:25:25 -0500 Received: from [65.74.133.9] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1Cxapq-0006Bh-TP for qemu-devel@nongnu.org; Sat, 05 Feb 2005 20:03:35 -0500 From: Paul Brook Date: Sun, 6 Feb 2005 01:03:29 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502060103.30562.paul@codesourcery.com> Subject: [Qemu-devel] Arm host float endian fix Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org The newer arm VFP floating point units store double values with natural word-ordering, unlike the old FPA unit which always used big-endian. Patch below updates host conditionals to reflect this. Paul Index: cpu-all.h =================================================================== RCS file: /cvsroot/qemu/qemu/cpu-all.h,v retrieving revision 1.39 diff -u -p -r1.39 cpu-all.h --- cpu-all.h 28 Jan 2005 22:37:22 -0000 1.39 +++ cpu-all.h 6 Feb 2005 00:57:27 -0000 @@ -114,10 +114,11 @@ static inline void tswap64s(uint64_t *s) #define tswapls(s) tswap64s((uint64_t *)(s)) #endif -/* NOTE: arm is horrible as double 32 bit words are stored in big endian ! */ +/* NOTE: arm FPA is horrible as double 32 bit words are stored in big endian! + */ typedef union { double d; -#if !defined(WORDS_BIGENDIAN) && !defined(__arm__) +#if !defined(WORDS_BIGENDIAN) && !defined(__arm__) && !defined (__VFP_FP__) struct { uint32_t lower; uint32_t upper;