From patchwork Tue Apr 12 21:59:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 90934 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EB2F2B6F54 for ; Wed, 13 Apr 2011 12:56:48 +1000 (EST) Received: from localhost ([::1]:49846 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9qG6-00033W-75 for incoming@patchwork.ozlabs.org; Tue, 12 Apr 2011 22:56:46 -0400 Received: from eggs.gnu.org ([140.186.70.92]:44436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9p9g-0002HN-HQ for qemu-devel@nongnu.org; Tue, 12 Apr 2011 21:46:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9lca-0007El-5T for qemu-devel@nongnu.org; Tue, 12 Apr 2011 17:59:41 -0400 Received: from hall.aurel32.net ([88.191.126.93]:49810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9lcZ-0007Dc-W6 for qemu-devel@nongnu.org; Tue, 12 Apr 2011 17:59:40 -0400 Received: from [2001:470:d4ed:0:5e26:aff:fe2b:6f5b] (helo=volta.aurel32.net) by hall.aurel32.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1Q9lcY-00088L-Vm; Tue, 12 Apr 2011 23:59:39 +0200 Received: from aurel32 by volta.aurel32.net with local (Exim 4.72) (envelope-from ) id 1Q9lcX-0002Z8-4P; Tue, 12 Apr 2011 23:59:37 +0200 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Tue, 12 Apr 2011 23:59:16 +0200 Message-Id: <1302645571-20500-5-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1302645571-20500-1-git-send-email-aurelien@aurel32.net> References: <1302645571-20500-1-git-send-email-aurelien@aurel32.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 88.191.126.93 Cc: Aurelien Jarno Subject: [Qemu-devel] [PATCH 04/19] target-i386: use float unions from cpu-all.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Use float unions from cpu-all.h instead of redefining new (wrong for arm) ones in target-i386. This also allows building cpu-exec.o with softfloat. Signed-off-by: Aurelien Jarno --- target-i386/exec.h | 27 ++------------------------- 1 files changed, 2 insertions(+), 25 deletions(-) diff --git a/target-i386/exec.h b/target-i386/exec.h index 6f9f709..63a23cd 100644 --- a/target-i386/exec.h +++ b/target-i386/exec.h @@ -144,13 +144,7 @@ static inline void svm_check_intercept(uint32_t type) #ifdef USE_X86LDOUBLE /* only for x86 */ -typedef union { - long double d; - struct { - unsigned long long lower; - unsigned short upper; - } l; -} CPU86_LDoubleU; +typedef CPU_LDoubleU CPU86_LDoubleU; /* the following deal with x86 long double-precision numbers */ #define MAXEXPD 0x7fff @@ -162,24 +156,7 @@ typedef union { #else -/* NOTE: arm is horrible as double 32 bit words are stored in big endian ! */ -typedef union { - double d; -#if !defined(HOST_WORDS_BIGENDIAN) && !defined(__arm__) - struct { - uint32_t lower; - int32_t upper; - } l; -#else - struct { - int32_t upper; - uint32_t lower; - } l; -#endif -#ifndef __arm__ - int64_t ll; -#endif -} CPU86_LDoubleU; +typedef CPU_DoubleU CPU86_LDoubleU; /* the following deal with IEEE double-precision numbers */ #define MAXEXPD 0x7ff