From patchwork Tue Mar 27 20:23:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Stubbs X-Patchwork-Id: 149027 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 689A8B6EEA for ; Wed, 28 Mar 2012 07:24:11 +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=1333484651; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC: Subject:References:In-Reply-To:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=kI/uIUx2rGustjXw3FkMnMoR4r8=; b=EIJzsetLZpSMQbCcHari5zCHCOjGd4VjL/wDOj6eCHPGEu87okdAQawyoW1frY fKXHGqQjOiWObBI6Dkrt9IxIJTwOySWE2A1LKAEmEXuWndRDZ/+OzQzohrngJpJD VO242BSiMMgR+779SdZOlqJK3nuQGPmlOBwnuD5FJgK+8= 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:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=ISeFVAuIUWgNF9ns/PhoYraTiHYDntyGiSX4kZP7CFwXoLKj4douKOx0JmNyz0 WxczOqj4ZcIsNpqHVtc2mfYBMg4WtgaMrITHpIK02O1AgkS/zIsCT7eKxxgI8ZQx /6T8sWyKEELzySK/KXFPU4IuxanCU8sO6rzsAcg4vMD7M=; Received: (qmail 16609 invoked by alias); 27 Mar 2012 20:24:05 -0000 Received: (qmail 16569 invoked by uid 22791); 27 Mar 2012 20:23:58 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Mar 2012 20:23:43 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SCcvc-0002rQ-F8 from Andrew_Stubbs@mentor.com ; Tue, 27 Mar 2012 13:23:40 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 27 Mar 2012 13:23:40 -0700 Received: from [172.30.15.35] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Tue, 27 Mar 2012 21:23:38 +0100 Message-ID: <4F7221C5.1030607@codesourcery.com> Date: Tue, 27 Mar 2012 21:23:33 +0100 From: Andrew Stubbs User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120310 Thunderbird/11.0 MIME-Version: 1.0 To: Richard Henderson CC: Richard Earnshaw , "gcc-patches@gcc.gnu.org" , "patches@linaro.org" Subject: Re: [PATCH][ARM] NEON DImode not References: <4F4E3AA5.1070804@codesourcery.com> <4F4E67B3.8050002@arm.com> <4F4F7226.6070809@codesourcery.com> <4F4FACC2.2050508@arm.com> <4F58DBFF.6080002@codesourcery.com> <4F58F454.2030803@redhat.com> In-Reply-To: <4F58F454.2030803@redhat.com> 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 On 08/03/12 18:03, Richard Henderson wrote: > On 03/08/12 08:19, Andrew Stubbs wrote: >> + (set_attr "arch" "nota8,*,*,onlya8") >> + (set_attr_alternative "insn_enabled" >> + [(if_then_else (match_test "TARGET_NEON") >> + (const_string "yes") (const_string "no")) >> + (const_string "yes") >> + (const_string "yes") >> + (if_then_else (match_test "TARGET_NEON") >> + (const_string "yes") (const_string "no"))])] >> ) > > While this works, it might be better to add neon/neon_na8/neon_oa8 > alternatives to the arch attribute, and adjust arch_enabled to match. > > Obviously this opinion is non-binding; Richard E might have other plans... No reply from Richard so far ... so here's an update. OK now? Andrew 2012-03-27 Andrew Stubbs gcc/ * config/arm/arm.md (arch): Add neon_onlya8 and neon_nota8. (arch_enabled): Handle new arch types. (one_cmpldi2): Add NEON support. diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 751997f..6669329 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -207,7 +207,7 @@ ; for ARM or Thumb-2 with arm_arch6, and nov6 for ARM without ; arm_arch6. This attribute is used to compute attribute "enabled", ; use type "any" to enable an alternative in all cases. -(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,onlya8,nota8" +(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,onlya8,neon_onlya8,nota8,neon_nota8" (const_string "any")) (define_attr "arch_enabled" "no,yes" @@ -246,8 +246,18 @@ (eq_attr "tune" "cortexa8")) (const_string "yes") + (and (eq_attr "arch" "neon_onlya8") + (eq_attr "tune" "cortexa8") + (match_test "TARGET_NEON")) + (const_string "yes") + (and (eq_attr "arch" "nota8") (not (eq_attr "tune" "cortexa8"))) + (const_string "yes") + + (and (eq_attr "arch" "neon_nota8") + (not (eq_attr "tune" "cortexa8")) + (match_test "TARGET_NEON")) (const_string "yes")] (const_string "no"))) @@ -4207,11 +4217,16 @@ "") (define_insn_and_split "one_cmpldi2" - [(set (match_operand:DI 0 "s_register_operand" "=&r,&r") - (not:DI (match_operand:DI 1 "s_register_operand" "0,r")))] + [(set (match_operand:DI 0 "s_register_operand" "=w,&r,&r,?w") + (not:DI (match_operand:DI 1 "s_register_operand" " w, 0, r, w")))] "TARGET_32BIT" - "#" - "TARGET_32BIT && reload_completed" + "@ + vmvn\t%P0, %P1 + # + # + vmvn\t%P0, %P1" + "TARGET_32BIT && reload_completed + && arm_general_register_operand (operands[0], DImode)" [(set (match_dup 0) (not:SI (match_dup 1))) (set (match_dup 2) (not:SI (match_dup 3)))] " @@ -4221,8 +4236,10 @@ operands[3] = gen_highpart (SImode, operands[1]); operands[1] = gen_lowpart (SImode, operands[1]); }" - [(set_attr "length" "8") - (set_attr "predicable" "yes")] + [(set_attr "length" "*,8,8,*") + (set_attr "predicable" "yes") + (set_attr "neon_type" "neon_int_1,*,*,neon_int_1") + (set_attr "arch" "neon_nota8,*,*,neon_onlya8")] ) (define_expand "one_cmplsi2"