From patchwork Thu Apr 24 05:35:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Glisse X-Patchwork-Id: 342087 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 F3A7614008E for ; Thu, 24 Apr 2014 15:35:29 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:in-reply-to:message-id:references :mime-version:content-type; q=dns; s=default; b=WK5BaT/Cse8iMBuH q7ZySgkvnzrlGYSx7mu4N2xdQ1z8b7bTMrEORtxKIpioI0brX5DcclUNxnBt5oal KEuk/eXlKC2vx9s4cExqZGyAJMTDJ7aHthj1jm4lbpN99Qe0kejZGQFMWKdzzlR8 tX7mJHmdsPaDjWPVOayp6p/P47s= 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:date :from:to:cc:subject:in-reply-to:message-id:references :mime-version:content-type; s=default; bh=VHSIFgpwJioe5x3YxsB/JW 1d1sU=; b=WNomwRxZc2P5VStTmjXh2KmN/zneF83WQCMdPzcu4veh2Q1MaaD2l2 RO8IJhZnRtRam79Iw/7ezkxNUcla5zdhKovv6T9JAF9UCLs/BbfOyqbb6fZAK81e m2ARKNc1BzBV9teEDG4oMbFA/Lp4I8o2yygncEP/RoZow/a+ld0DM= Received: (qmail 18056 invoked by alias); 24 Apr 2014 05:35:21 -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 18046 invoked by uid 89); 24 Apr 2014 05:35:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail2-relais-roc.national.inria.fr Received: from mail2-relais-roc.national.inria.fr (HELO mail2-relais-roc.national.inria.fr) (192.134.164.83) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Thu, 24 Apr 2014 05:35:19 +0000 Received: from stedding.saclay.inria.fr ([193.55.250.194]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA; 24 Apr 2014 07:35:15 +0200 Received: from glisse (helo=localhost) by stedding.saclay.inria.fr with local-esmtp (Exim 4.82) (envelope-from ) id 1WdCJX-0005mN-Cc; Thu, 24 Apr 2014 07:35:15 +0200 Date: Thu, 24 Apr 2014 07:35:15 +0200 (CEST) From: Marc Glisse To: "H.J. Lu" cc: GCC Patches , Uros Bizjak Subject: Re: [i386] define __SIZEOF_FLOAT128__ In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 On Wed, 23 Apr 2014, H.J. Lu wrote: > On Wed, Apr 23, 2014 at 11:48 AM, Marc Glisse wrote: >> (Adding an i386 maintainer in Cc) >> http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00620.html >> >> >> On Sun, 13 Apr 2014, Marc Glisse wrote: >> >>> Hello, >>> >>> some people like having a macro to test if a type is available >>> (__SIZEOF_INT128__ for instance). This adds macros for __float80 and >>> __float128. The types seem to be always available, so I didn't add any >>> condition. >>> >>> If you think this is a bad idea, please close the PR. >>> >>> Bootstrap+testsuite on x86_64-linux-gnu. >>> >>> 2014-04-13 Marc Glisse >>> >>> PR preprocessor/56540 >>> * config/i386/i386-c.c (ix86_target_macros): Define >>> __SIZEOF_FLOAT80__ and __SIZEOF_FLOAT128__. >> > > For __SIZEOF_FLOAT80__, you should check TARGET_128BIT_LONG_DOUBLE > instead of TARGET_64BIT. Good point, thanks! It now matches i386-modes.def. Is this version (same changelog) ok? Index: gcc/config/i386/i386-c.c =================================================================== --- gcc/config/i386/i386-c.c (revision 209721) +++ gcc/config/i386/i386-c.c (working copy) @@ -511,20 +511,27 @@ ix86_target_macros (void) if (!TARGET_80387) cpp_define (parse_in, "_SOFT_FLOAT"); if (TARGET_LONG_DOUBLE_64) cpp_define (parse_in, "__LONG_DOUBLE_64__"); if (TARGET_LONG_DOUBLE_128) cpp_define (parse_in, "__LONG_DOUBLE_128__"); + if (TARGET_128BIT_LONG_DOUBLE) + cpp_define (parse_in, "__SIZEOF_FLOAT80__=16"); + else + cpp_define (parse_in, "__SIZEOF_FLOAT80__=12"); + + cpp_define (parse_in, "__SIZEOF_FLOAT128__=16"); + cpp_define_formatted (parse_in, "__ATOMIC_HLE_ACQUIRE=%d", IX86_HLE_ACQUIRE); cpp_define_formatted (parse_in, "__ATOMIC_HLE_RELEASE=%d", IX86_HLE_RELEASE); ix86_target_macros_internal (ix86_isa_flags, ix86_arch, ix86_tune, ix86_fpmath, cpp_define); }