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: 179385 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp10836447ilf; Thu, 14 Nov 2019 02:07:47 -0800 (PST) X-Google-Smtp-Source: APXvYqwqsS+k0n6deMji7SlCNKOYLAs+M8D+0pbxo+taVBGR2E1/GCLFggebxptcxbP90ZmO30AB X-Received: by 2002:a17:906:4d58:: with SMTP id b24mr7453103ejv.277.1573726067884; Thu, 14 Nov 2019 02:07:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573726067; cv=none; d=google.com; s=arc-20160816; b=uI6+8DhKDrkdz17lFULAagOFxpcCf1Q8RY4swWyIfaD4R2ZaB4vpmsC/7sv9AfrFok puhiTuZ7e5jJuYbtLlbBVk3a6DVKhknrQGQ0uYgwg+/Gv1TN6T+RsOs0opJaPoUkWvUN Y5hE+qYQ8Fr4lsz+SeMQCuZp+9lzJr4FYmpI9IGLKE8zn7S3g10eAlOKfvVRGSYWsZxr S1LkEwJTs+K/6gjskjAER5t2NM4MqFDBuJiCtNf9TdnNAt27FGagfrGkAvfleIp/FC6+ A5ZPGzyeYKtSLrw1lVpcIvsCaooWNY42Dm2fmv+fy6RmLTL9oiTm+/5m+XGhkWeDKkXP Capg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature:delivered-to :sender:list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature; bh=IDmpxXM4mPjn73hqp+m0nac3g0VuhRasVWzYvFe//ng=; b=JMa7rfgntZAGrJb+jqxFS7ALRTI64939RBxcKjrkrsk2sn5bE564ehO1z9vYLMfHQk O1dvZFwz4V4PrvcIldZnG+BnrXtQn/bg0J7t6urhtwqt/7dkgmhXj+b29b2FLBvUucG8 LTs48vagPZA/s7fwStj8M2QUw0a1Ld2lp8zGwcthwcPjbzETvCTRlGkmTKRwY9lVn6PJ Nz+Sedjyi+5DH7AL+84EuJMNi0EErzbzf0yyz167ajMkdD/fuxHVOAgTPqp88z8PZCIf KJAc0H0474LvuUx2x8JvLHnrxCRyamV5NA7rB7IdsaqUJbjAxuoDrzllU49LXw6LZGPH q4ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ovws7YUz; dkim=pass header.i=@linaro.org header.s=google header.b=qi0iEAZ2; spf=pass (google.com: domain of gcc-patches-return-513343-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-513343-patch=linaro.org@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id i10si3221628ejj.8.2019.11.14.02.07.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Nov 2019 02:07:47 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-513343-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ovws7YUz; dkim=pass header.i=@linaro.org header.s=google header.b=qi0iEAZ2; spf=pass (google.com: domain of gcc-patches-return-513343-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-513343-patch=linaro.org@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=KEQMeytDNQfY sNOu8QTH+xfK3dk5qx0grIf7VBtjBlSAdUbeUHEGax0Gx0Ej1RYlbvI09BTfPZqf F2ZlJ3AMjRSgGYRpqNMn+9/3YVoNxvYq+t+Uwli6z08JL6rHnKKwb7bwPzYoybZV FcpTI7H+1mkFZJVK94P1tIbBZn2ijww= 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=ovws7YUzk5XRlIGZT+uQnCNA0N5ktqrePAh/dVNyu0aZhStIFs cZ1vl7Yf2GCBipp0mN41L4RT6Z5aYKROGLpIt82YQUN+yNLJaxdX341sszWcD+bU qV9+NO9b4Pv/kLyCCoLvltUkcY9GUV+cclk/HTJDWCCzrxK2rrrNXl/fk= 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== Return-Path: 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 -- 2.17.1