From patchwork Mon Sep 21 11:12:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wahab X-Patchwork-Id: 520250 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 97FCB140187 for ; Mon, 21 Sep 2015 21:12:36 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=fhcRxCzi; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:references:from:cc:to:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=unMP73jOoyUqZB30J 0C1Q0G0N2iBI6Tk8kI6nmq9uERA5t8l601hjbBFLF4J/arRmtyZO2QRuHk93+H03 iQUOdeOwZRkUYiVrRHQBseM/slPWfHpJMUFy+veJ1bSTSw1dPYURM6PpqSP7FDAb WzYa9kUl4+XMDsZnYw4u9Ze6o0= 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 :subject:references:from:cc:to:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=ZcNsfdkfepuE9GAAL2quLAt ubSs=; b=fhcRxCzixlADdw8I4ZxmFIMVHCnmlYK0qYHL9om0qNw4I5liG9DY2S+ 0AfGlE6Y6uT9OuHeFT2FKBftdi9ODmjLZJnpXVLsjkBux5mgo3JcoTvDe2/XVNHe O+81Dxc5YTq2+MoF3kcb4TeROPlIGOTRvic1uD6GyL3BmKVrTmcU= Received: (qmail 61314 invoked by alias); 21 Sep 2015 11:12:29 -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 61302 invoked by uid 89); 21 Sep 2015 11:12:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 21 Sep 2015 11:12:24 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 992CD4A7; Mon, 21 Sep 2015 04:12:27 -0700 (PDT) Received: from e108033-lin.cambridge.arm.com (e108033-lin.cambridge.arm.com [10.2.206.52]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EAC353F317; Mon, 21 Sep 2015 04:12:22 -0700 (PDT) Subject: Re: [AArch64][PATCH 2/5] Make BIC, other logical instructions, available. (was: Add BIC instruction.) References: <55FAEC63.7040403@foss.arm.com> <55FAED10.2010108@foss.arm.com> <20150918080542.GB32711@arm.com> From: Matthew Wahab Cc: gcc-patches@gcc.gnu.org To: James Greenhalgh Message-ID: <55FFE615.1070900@foss.arm.com> Date: Mon, 21 Sep 2015 12:12:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150918080542.GB32711@arm.com> X-IsSubscribed: yes On 18/09/15 09:05, James Greenhalgh wrote: > On Thu, Sep 17, 2015 at 05:40:48PM +0100, Matthew Wahab wrote: >> Hello, >> >> ARMv8.1 adds atomic swap and atomic load-operate instructions with >> optional memory ordering specifiers. This patch adds an expander to >> generate a BIC instruction that can be explicitly called when >> implementing the atomic__fetch pattern to calculate the value to >> be returned by the operation. >> > > Why not make the "*_one_cmpl_3" pattern > named (remove the leading *) and call that in your atomic__fetch > patterns as: > > and_one_cmpl_3 > > I'd rather that than to add a pettern that simply expands to the same > thing. I overlooked that pattern when I was trying to find the bic emitter. I've attached an updated patch. Tested as part of the series for aarch64-none-linux-gnu with native bootstrap and make check. Also tested for aarch64-none-elf with cross-compiled check-gcc on an ARMv8.1 emulator with +lse enabled by default. Ok for trunk? Matthew 2015-09-21 Matthew Wahab * config/aarch64/aarch64.md (_one_cmpl_3): Make a named pattern. From 0e2ae8739d70e4d1c14fa848f67847b1ecf94f71 Mon Sep 17 00:00:00 2001 From: Matthew Wahab Date: Mon, 17 Aug 2015 17:48:27 +0100 Subject: [PATCH 2/5] Make BIC, other logical instructions, available for use. Change-Id: Ibef049bfa1bfe5e168feada3dc358f28383e6410 --- gcc/config/aarch64/aarch64.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 88ba72e..72384ce 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -3392,7 +3392,7 @@ [(set_attr "type" "logics_reg")] ) -(define_insn "*_one_cmpl_3" +(define_insn "_one_cmpl_3" [(set (match_operand:GPI 0 "register_operand" "=r") (LOGICAL:GPI (not:GPI (SHIFT:GPI -- 2.1.4