From patchwork Tue Dec 6 22:43:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Miller X-Patchwork-Id: 129839 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]) by ozlabs.org (Postfix) with SMTP id 41F851007D5 for ; Wed, 7 Dec 2011 09:44:13 +1100 (EST) Received: (qmail 28564 invoked by alias); 6 Dec 2011 22:44:09 -0000 Received: (qmail 28412 invoked by uid 22791); 6 Dec 2011 22:44:08 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, TW_LX, TW_SV X-Spam-Check-By: sourceware.org Received: from shards.monkeyblade.net (HELO shards.monkeyblade.net) (198.137.202.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Dec 2011 22:43:55 +0000 Received: from localhost (nat-pool-rdu.redhat.com [66.187.233.202]) (authenticated bits=0) by shards.monkeyblade.net (8.14.4/8.14.4) with ESMTP id pB6MhreH028591 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO) for ; Tue, 6 Dec 2011 14:43:54 -0800 Date: Tue, 06 Dec 2011 17:43:53 -0500 (EST) Message-Id: <20111206.174353.930438054376852009.davem@davemloft.net> To: gcc-patches@gcc.gnu.org Subject: [PATCH] sparc: Fix warnings when using visintrin.h with VIS level lower than 3. From: David Miller Mime-Version: 1.0 X-IsSubscribed: yes 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 I've known about this problem for a while but I just haven't gotten around to fixing it up in the tree. Committed to trunk. * config/sparc/visintrin.h: Add appropriate __VIS__ cpp protection. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182067 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/config/sparc/visintrin.h | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1b0fe1a..2ccfa61 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2011-12-06 David S. Miller + + * config/sparc/visintrin.h: Add appropriate __VIS__ cpp protection. + 2011-12-06 Georg-Johann Lay * config/avr/avr.c (avr_file_start): Fix missing , diff --git a/gcc/config/sparc/visintrin.h b/gcc/config/sparc/visintrin.h index deb68b4..eb4d739 100644 --- a/gcc/config/sparc/visintrin.h +++ b/gcc/config/sparc/visintrin.h @@ -24,6 +24,8 @@ #ifndef _VISINTRIN_H_INCLUDED #define _VISINTRIN_H_INCLUDED +#ifdef __VIS__ + typedef int __v2si __attribute__ ((__vector_size__ (8))); typedef int __v1si __attribute__ ((__vector_size__ (4))); typedef short __v4hi __attribute__ ((__vector_size__ (8))); @@ -32,6 +34,8 @@ typedef unsigned char __v8qi __attribute__ ((__vector_size__ (8))); typedef unsigned char __v4qi __attribute__ ((__vector_size__ (4))); typedef int __i64 __attribute__ ((__mode__ (DI))); +#if __VIS__ >= 0x200 + extern __inline void __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) __vis_write_gsr (__i64 __A) @@ -46,6 +50,8 @@ __vis_read_gsr (void) return __builtin_vis_read_gsr (); } +#endif /* __VIS__ >= 0x200 */ + extern __inline void * __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) __vis_alignaddr (void *__A, long __B) @@ -354,6 +360,8 @@ __vis_array32 (long __A, long __B) return __builtin_vis_array32 (__A, __B); } +#if __VIS__ >= 0x200 + extern __inline long __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) __vis_bmask (long __A, long __B) @@ -431,6 +439,10 @@ __vis_edge32ln (void *__A, void *__B) return __builtin_vis_edge32ln (__A, __B); } +#endif /* __VIS__ >= 0x200 */ + +#if __VIS__ >= 0x300 + extern __inline void __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) __vis_cmask8 (long __A) @@ -690,4 +702,8 @@ __vis_xmulxhi (__i64 __A, __i64 __B) return __builtin_vis_xmulxhi (__A, __B); } +#endif /* __VIS__ >= 0x300 */ + +#endif /* __VIS__ */ + #endif /* _VISINTRIN_H_INCLUDED */