From patchwork Thu Nov 14 10:07:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 1194676 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-513343-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="GD3Kj0Nn"; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="qi0iEAZ2"; dkim-atps=neutral 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 47DHGl3Y20z9sNT for ; Thu, 14 Nov 2019 21:07:41 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=k35l0Knlza9c pLsLGt/Lh8x+Al6g7MNogBEz6x2yOsmK0bxpeIGmlPzAJ3SmaZN7S2wxaexeAPxM Ko42OSuAQZJRQWDPbuleM3lVN9GdJYk1rY9mZ5ZQAjQgfEUSElgtloikX+q0KLBU 2A+W7NTF4wGhkvau7VZQL3J+4tJBIwY= 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:from :to:cc:subject:date:message-id; s=default; bh=DYPGwVaAgPPegEvPd0 J/EUpUwr8=; b=GD3Kj0Nnrm2RPPu+VTL9Zs1S7uEWVc/Fhl9ePT7POSWyAD+978 Ue9gcgXv96XK2N4UkXNhYejpwtcS2LRq0GHx0COvGlhcjZ8T+7y06QBiFEoySs8G HYl6k8VdjHrwdYv/6Vo6qrjlscp5jzQj18KNuDR+6YFGZmpVnpgcRyZmU= Received: (qmail 74152 invoked by alias); 14 Nov 2019 10:07:34 -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 74144 invoked by uid 89); 14 Nov 2019 10:07:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Spam-Relays-External:209.85.128.66, HX-Received:a1c, H*RU:209.85.128.66, his X-HELO: mail-wm1-f66.google.com Received: from mail-wm1-f66.google.com (HELO mail-wm1-f66.google.com) (209.85.128.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Nov 2019 10:07:31 +0000 Received: by mail-wm1-f66.google.com with SMTP id b17so5197627wmj.2 for ; Thu, 14 Nov 2019 02:07:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=IDmpxXM4mPjn73hqp+m0nac3g0VuhRasVWzYvFe//ng=; b=qi0iEAZ2EEisAJ8jVLAJBcgSzOF52XqLOnhDZKCpPrYI+iNzmZ5Hn/xlwGUmAErOBL i7VZ9P/hLqxcDeg3jtzOZiyvCaRqtYEG5UaXUI9v+t2iOBvSDp2t5uGOw6ydUBKaINYH TMUmaJvSbN4oMVNPRhPqam/StMERdCf+938zllRodPvw+FqSJCEyNnqHocafnxVwj8QB HiPW7rliWsW3bHVQ2uOfsG8HWWES30XUSdd5elXCXA2tMItVZblwliUSlcoYq5tMmOgA MUtpIzA5+Hqrs8uW8hufuiCDBA+8dpvlYEktQZAQruw3A17ucXc5afjp3YobrD1s7Yvq 3nwQ== Received: from localhost.localdomain (184.red-37-158-56.dynamicip.rima-tde.net. [37.158.56.184]) by smtp.gmail.com with ESMTPSA id x26sm5359539wmc.14.2019.11.14.02.07.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2019 02:07:28 -0800 (PST) From: Richard Henderson To: gcc-patches@gcc.gnu.org Cc: richard.earnshaw@arm.com, kyrylo.tkachov@arm.com, richard.sandiford@arm.com Subject: [PATCH v2 0/6] Implement asm flag outputs for arm + aarch64 Date: Thu, 14 Nov 2019 11:07:10 +0100 Message-Id: <20191114100716.28827-1-richard.henderson@linaro.org> I've put the implementation into config/arm/aarch-common.c, so that it can be shared between the two targets. This required a little bit of cleanup to the CC modes and constraints to get the two targets to match up. Changes for v2: * Document overflow flags. * Add "hs" and "lo" as aliases of "cs" and "cc". * Add unsigned cmp tests to asm-flag-6.c. Richard Sandiford has given his ack for the aarch64 side. I'm still looking for an ack for the arm side. r~ Richard Henderson (6): aarch64: Add "c" constraint arm: Fix the "c" constraint arm: Rename CC_NOOVmode to CC_NZmode arm, aarch64: Add support for __GCC_ASM_FLAG_OUTPUTS__ arm: Add testsuite checks for asm-flag aarch64: Add testsuite checks for asm-flag gcc/config/arm/aarch-common-protos.h | 6 + gcc/config/aarch64/aarch64-c.c | 2 + gcc/config/aarch64/aarch64.c | 3 + gcc/config/arm/aarch-common.c | 136 +++++++++++++ gcc/config/arm/arm-c.c | 1 + gcc/config/arm/arm.c | 15 +- gcc/testsuite/gcc.target/aarch64/asm-flag-1.c | 35 ++++ gcc/testsuite/gcc.target/aarch64/asm-flag-3.c | 38 ++++ gcc/testsuite/gcc.target/aarch64/asm-flag-5.c | 30 +++ gcc/testsuite/gcc.target/aarch64/asm-flag-6.c | 62 ++++++ gcc/testsuite/gcc.target/arm/asm-flag-1.c | 36 ++++ gcc/testsuite/gcc.target/arm/asm-flag-3.c | 38 ++++ gcc/testsuite/gcc.target/arm/asm-flag-5.c | 30 +++ gcc/testsuite/gcc.target/arm/asm-flag-6.c | 62 ++++++ gcc/config/aarch64/constraints.md | 4 + gcc/config/arm/arm-modes.def | 4 +- gcc/config/arm/arm.md | 186 +++++++++--------- gcc/config/arm/constraints.md | 5 +- gcc/config/arm/predicates.md | 2 +- gcc/config/arm/thumb1.md | 8 +- gcc/config/arm/thumb2.md | 34 ++-- gcc/doc/extend.texi | 39 ++++ 22 files changed, 651 insertions(+), 125 deletions(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/asm-flag-1.c create mode 100644 gcc/testsuite/gcc.target/aarch64/asm-flag-3.c create mode 100644 gcc/testsuite/gcc.target/aarch64/asm-flag-5.c create mode 100644 gcc/testsuite/gcc.target/aarch64/asm-flag-6.c create mode 100644 gcc/testsuite/gcc.target/arm/asm-flag-1.c create mode 100644 gcc/testsuite/gcc.target/arm/asm-flag-3.c create mode 100644 gcc/testsuite/gcc.target/arm/asm-flag-5.c create mode 100644 gcc/testsuite/gcc.target/arm/asm-flag-6.c