From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14274 invoked by alias); 1 Apr 2015 08:40:39 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 14264 invoked by uid 89); 1 Apr 2015 08:40:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 01 Apr 2015 08:40:38 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t318eXNu022340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 1 Apr 2015 04:40:33 -0400 Received: from tucnak.zalov.cz (ovpn-116-58.ams2.redhat.com [10.36.116.58]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t318eVQq009501 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Apr 2015 04:40:33 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id t318eUTX001399; Wed, 1 Apr 2015 10:40:30 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id t318eSle001398; Wed, 1 Apr 2015 10:40:28 +0200 Date: Wed, 01 Apr 2015 08:40:00 -0000 From: Jakub Jelinek To: David Edelsohn , Ulrich Weigand Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Disable ppc/spu context sensitive macros for CLK_ASM preprocessing (PR preprocessor/61977) Message-ID: <20150401084028.GJ19273@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00005.txt.bz2 Hi! The context sensitive macros are inherently C/C++ specific, so trying to expand them into anything when preprocessing assembler doesn't make any sense to me. Ok for trunk? 2015-04-01 Jakub Jelinek PR preprocessor/61977 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Don't predefine __vector/__bool/__pixel macros nor context sensitive macros for CLK_ASM. * config/spu/spu-c.c (spu_cpu_cpp_builtins): Similarly. --- gcc/config/rs6000/rs6000-c.c.jj 2015-01-09 22:00:06.000000000 +0100 +++ gcc/config/rs6000/rs6000-c.c 2015-04-01 10:31:19.127603956 +0200 @@ -420,7 +420,7 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfi if (TARGET_FRSQRTES) builtin_define ("__RSQRTEF__"); - if (TARGET_EXTRA_BUILTINS) + if (TARGET_EXTRA_BUILTINS && cpp_get_options (pfile)->lang != CLK_ASM) { /* Define the AltiVec syntactic elements. */ builtin_define ("__vector=__attribute__((altivec(vector__)))"); --- gcc/config/spu/spu-c.c.jj 2015-01-09 22:00:01.000000000 +0100 +++ gcc/config/spu/spu-c.c 2015-04-01 10:33:20.473610886 +0200 @@ -203,7 +203,8 @@ spu_cpu_cpp_builtins (struct cpp_reader cpp_assert (pfile, "machine=spu"); if (spu_arch == PROCESSOR_CELLEDP) cpp_define (pfile, "__SPU_EDP__"); - cpp_define (pfile, "__vector=__attribute__((__spu_vector__))"); + if (cpp_get_options (pfile)->lang != CLK_ASM) + cpp_define (pfile, "__vector=__attribute__((__spu_vector__))"); switch (spu_ea_model) { case 32: @@ -216,7 +217,7 @@ spu_cpu_cpp_builtins (struct cpp_reader gcc_unreachable (); } - if (!flag_iso) + if (!flag_iso && cpp_get_options (pfile)->lang != CLK_ASM) { /* Define this when supporting context-sensitive keywords. */ cpp_define (pfile, "__VECTOR_KEYWORD_SUPPORTED__"); Jakub