From patchwork Wed Jan 8 18:13:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 308390 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7C3D82C00AC for ; Thu, 9 Jan 2014 05:14:57 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=cjJQk6UVTT3kvXaBlhq5EyUsi3T7PijX34vHvZbeZ11vfEgb/E2wh bC5iPIcIoyf+A0T17Q49Zkj/41VVoYkcO3d531OSrnrRfjqFLr1oluiuGdBur0HR nIrYUK+9aJtcE/XgzdX4BEDtjZXqSVCvBNOrywWAbu+r24JQuaT46c= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=SOj0VvF8MzOrYHQvnUgaPWf15Gs=; b=L/f7G1P1NgUjS61uNU9w rFjZx6LWxzgFaTmuTaSdRZgXo2BeTTvjWiqQPsi1f7ktD8bALzgrlw6OpzXVCl4i UotHNuyhfsgsTesH/oKTv4JBO92e7vM1nsKDlvdgTQlAUPM9MUA50oITS78wUMXb NtQYZJTn1gUB/mDgxlTPDWc= Received: (qmail 8680 invoked by alias); 8 Jan 2014 18:14:06 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 8574 invoked by uid 89); 8 Jan 2014 18:14:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qc0-f173.google.com Received: from mail-qc0-f173.google.com (HELO mail-qc0-f173.google.com) (209.85.216.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 08 Jan 2014 18:14:04 +0000 Received: by mail-qc0-f173.google.com with SMTP id m20so1749099qcx.18 for ; Wed, 08 Jan 2014 10:14:02 -0800 (PST) X-Received: by 10.49.59.83 with SMTP id x19mr17813143qeq.47.1389204842012; Wed, 08 Jan 2014 10:14:02 -0800 (PST) Received: from anchor.com (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPSA id q4sm2150267qac.18.2014.01.08.10.14.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jan 2014 10:14:01 -0800 (PST) From: Richard Henderson To: gcc-patches@gcc.gnu.org Cc: Marcus.Shawcroft@arm.com, Yufeng.Zhang@arm.com Subject: [PATCH, AArch64 4/6] soft-fp: Commonize creation of TImode types Date: Wed, 8 Jan 2014 10:13:19 -0800 Message-Id: <1389204801-9832-5-git-send-email-rth@redhat.com> In-Reply-To: <1389204801-9832-1-git-send-email-rth@redhat.com> References: <1389204801-9832-1-git-send-email-rth@redhat.com> X-IsSubscribed: yes No need to do this over and over for different 64-bit hosts. libgcc/ * config/soft-fp/soft-fp.h (TItype, UTItype, TI_BITS): New. * config/aarch64/sfp-machine.h (TItype, UTItype, TI_BITS): Remove. * config/i386/64/sfp-machine.h: Likewise. * config/ia64/sfp-machine.h: Likewise. * config/tilegx/sfp-machine32.h: Likewise. * config/tilegx/sfp-machine64.h: Likewise. --- libgcc/config/aarch64/sfp-machine.h | 4 ---- libgcc/config/i386/64/sfp-machine.h | 5 ----- libgcc/config/ia64/sfp-machine.h | 5 ----- libgcc/config/tilegx/sfp-machine32.h | 5 ----- libgcc/config/tilegx/sfp-machine64.h | 5 ----- libgcc/soft-fp/soft-fp.h | 8 ++++++++ 6 files changed, 8 insertions(+), 24 deletions(-) diff --git a/libgcc/config/aarch64/sfp-machine.h b/libgcc/config/aarch64/sfp-machine.h index 61b5f72..5e676be 100644 --- a/libgcc/config/aarch64/sfp-machine.h +++ b/libgcc/config/aarch64/sfp-machine.h @@ -28,10 +28,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define _FP_WS_TYPE signed long long #define _FP_I_TYPE int -typedef int TItype __attribute__ ((mode (TI))); -typedef unsigned int UTItype __attribute__ ((mode (TI))); -#define TI_BITS (__CHAR_BIT__ * (int)sizeof(TItype)) - /* The type of the result of a floating point comparison. This must match __libgcc_cmp_return__ in GCC for the target. */ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__))); diff --git a/libgcc/config/i386/64/sfp-machine.h b/libgcc/config/i386/64/sfp-machine.h index 1ff94c2..8197536 100644 --- a/libgcc/config/i386/64/sfp-machine.h +++ b/libgcc/config/i386/64/sfp-machine.h @@ -3,11 +3,6 @@ #define _FP_WS_TYPE signed long long #define _FP_I_TYPE long long -typedef int TItype __attribute__ ((mode (TI))); -typedef unsigned int UTItype __attribute__ ((mode (TI))); - -#define TI_BITS (__CHAR_BIT__ * (int)sizeof(TItype)) - #define _FP_MUL_MEAT_Q(R,X,Y) \ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) diff --git a/libgcc/config/ia64/sfp-machine.h b/libgcc/config/ia64/sfp-machine.h index e06bc9a..f7dd928 100644 --- a/libgcc/config/ia64/sfp-machine.h +++ b/libgcc/config/ia64/sfp-machine.h @@ -3,11 +3,6 @@ #define _FP_WS_TYPE signed long #define _FP_I_TYPE long -typedef int TItype __attribute__ ((mode (TI))); -typedef unsigned int UTItype __attribute__ ((mode (TI))); - -#define TI_BITS (__CHAR_BIT__ * (int)sizeof(TItype)) - /* The type of the result of a floating point comparison. This must match `__libgcc_cmp_return__' in GCC for the target. */ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__))); diff --git a/libgcc/config/tilegx/sfp-machine32.h b/libgcc/config/tilegx/sfp-machine32.h index 31a2032..a921533 100644 --- a/libgcc/config/tilegx/sfp-machine32.h +++ b/libgcc/config/tilegx/sfp-machine32.h @@ -3,11 +3,6 @@ #define _FP_WS_TYPE signed long #define _FP_I_TYPE long -typedef int TItype __attribute__ ((mode (TI))); -typedef unsigned int UTItype __attribute__ ((mode (TI))); - -#define TI_BITS (__CHAR_BIT__ * (int)sizeof(TItype)) - /* The type of the result of a floating point comparison. This must match `__libgcc_cmp_return__' in GCC for the target. */ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__))); diff --git a/libgcc/config/tilegx/sfp-machine64.h b/libgcc/config/tilegx/sfp-machine64.h index 7cf352e..2586dd5 100644 --- a/libgcc/config/tilegx/sfp-machine64.h +++ b/libgcc/config/tilegx/sfp-machine64.h @@ -3,11 +3,6 @@ #define _FP_WS_TYPE signed long #define _FP_I_TYPE long -typedef int TItype __attribute__ ((mode (TI))); -typedef unsigned int UTItype __attribute__ ((mode (TI))); - -#define TI_BITS (__CHAR_BIT__ * (int)sizeof(TItype)) - /* The type of the result of a floating point comparison. This must match `__libgcc_cmp_return__' in GCC for the target. */ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__))); diff --git a/libgcc/soft-fp/soft-fp.h b/libgcc/soft-fp/soft-fp.h index 696fc86..b54b1ed 100644 --- a/libgcc/soft-fp/soft-fp.h +++ b/libgcc/soft-fp/soft-fp.h @@ -237,6 +237,11 @@ typedef int DItype __attribute__ ((mode (DI))); typedef unsigned int UQItype __attribute__ ((mode (QI))); typedef unsigned int USItype __attribute__ ((mode (SI))); typedef unsigned int UDItype __attribute__ ((mode (DI))); +#if _FP_W_TYPE_SIZE == 64 +typedef int TItype __attribute__ ((mode (TI))); +typedef unsigned int UTItype __attribute__ ((mode (TI))); +#endif + #if _FP_W_TYPE_SIZE == 32 typedef unsigned int UHWtype __attribute__ ((mode (HI))); #elif _FP_W_TYPE_SIZE == 64 @@ -249,6 +254,9 @@ typedef USItype UHWtype; #define SI_BITS (__CHAR_BIT__ * (int) sizeof (SItype)) #define DI_BITS (__CHAR_BIT__ * (int) sizeof (DItype)) +#if _FP_W_TYPE_SIZE == 64 +# define TI_BITS (__CHAR_BIT__ * (int) sizeof (TItype)) +#endif #ifndef umul_ppmm # ifdef _LIBC