From patchwork Thu Nov 29 14:27:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 202755 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 803332C0087 for ; Fri, 30 Nov 2012 01:27:39 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1354804059; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=FGwwg0cKHm6RBJ8pZydR 5VuSC7Y=; b=AVt7YPRUXOYRibOqORPcTUDbZFGHGixY25k3/3qzq34AeVzQr4+p gCd7H6dlGA0+Y3CSxSCF8KP0FWQhP3UEyVJ4UwUft4Qpy4xSQpucTHfIyNAve1dG 0amZD/aEJYdKrOUPCFy2bVYasFIJ1fhAd4VMMy5DPNUQyn9ThxrKTTQ= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:From:To:Cc:Subject:Date:Message-ID:MIME-Version:X-MC-Unique:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=XzfG+7CT6rg1BNoHpegVQn1ZhsIgz4gpjlUam7VnzTg9Y8l4Jy0xcaLCqlcxe1 q+xyYAObcbqMPrQY00vkXw3l5aX0Y8p5nZ91X1Rtwl3hqLvNbn06/4OZ2G9t+fqW qBp2ErTKyq2aaHEjHCnXVLROiR8yEN03B1Mucw//PblB8=; Received: (qmail 26556 invoked by alias); 29 Nov 2012 14:27:31 -0000 Received: (qmail 26544 invoked by uid 22791); 29 Nov 2012 14:27:30 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, MSGID_MULTIPLE_AT, RCVD_IN_DNSWL_LOW, TW_MF X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Nov 2012 14:27:25 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 29 Nov 2012 14:27:23 +0000 Received: from e106372vm ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Thu, 29 Nov 2012 14:27:22 +0000 From: "Kyrylo Tkachov" To: Cc: "'Ramana Radhakrishnan'" , "Richard Earnshaw" , Subject: [PATCH][ARM][2/3] AArch32 NEON vrint builtins and intrinsics Date: Thu, 29 Nov 2012 14:27:18 -0000 Message-ID: <006701cdce3d$a2f34030$e8d9c090$@tkachov@arm.com> MIME-Version: 1.0 X-MC-Unique: 112112914272309601 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 Hi all, This patch adds an effective target check to the testsuite for ARMv8 NEON support. A corresponding add_options procedure is added. This is used by the AArch32 NEON intrinsics tests. An entry in the documentation is added as well. Ok for trunk? Thanks, Kyrill gcc/ChangeLog 2012-11-29 Kyrylo Tkachov * doc/sourcebuild.texi: Document arm_v8_neon_ok. gcc/testsuite/ChangeLog 2012-11-29 Kyrylo Tkachov * lib/target-supports.exp (check_effective_target_arm_v8_neon_ok): New procedure. (add_options_for_arm_v8_neon): Likewise. diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 0f29326..ae05681 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -1560,6 +1560,10 @@ Some multilibs may be incompatible with these options. ARM target supports @code{-mfpu=fp-armv8 -mfloat-abi=softfp}. Some multilibs may be incompatible with these options. +@item arm_v8_neon_ok +ARM target supports @code{-mfpu=neon-fp-armv8 -mfloat-abi=softfp}. +Some multilibs may be incompatible with these options. + @item arm_prefer_ldrd_strd ARM target prefers @code{LDRD} and @code{STRD} instructions over @code{LDM} and @code{STM} instructions. diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 5935346..ca78808 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2107,6 +2107,22 @@ proc check_effective_target_arm_v8_vfp_ok {} { } } +# Return 1 if this is an ARM target supporting -mfpu=neon-fp-armv8 +# -mfloat-abi=softfp +proc check_effective_target_arm_v8_neon_ok {} { + if { [check_effective_target_arm32] } { + return [check_no_compiler_messages arm_v8_neon_ok object { + int foo (void) + { + __asm__ volatile ("vrintn.f32 q0, q0"); + return 0; + } + } "-mfpu=neon-fp-armv8 -mfloat-abi=softfp"] + } else { + return 0 + } +} + # Return 1 if this is an ARM target supporting -mfpu=vfp # -mfloat-abi=hard. Some multilibs may be incompatible with these # options. @@ -2166,6 +2182,13 @@ proc add_options_for_arm_v8_vfp { flags } { return "$flags -mfpu=fp-armv8 -mfloat-abi=softfp" } +proc add_options_for_arm_v8_neon { flags } { + if { ! [check_effective_target_arm_v8_neon_ok] } { + return "$flags" + } + return "$flags -mfpu=neon-fp-armv8 -mfloat-abi=softfp" +} + # Add the options needed for NEON. We need either -mfloat-abi=softfp # or -mfloat-abi=hard, but if one is already specified by the # multilib, use it. Similarly, if a -mfpu option already enables