Message ID | 20230428061210.2988035-5-christoph.muellner@vrull.eu |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp728069vqo; Thu, 27 Apr 2023 23:14:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ57O2rFSbKojFRnPKjPKaemkil6TifAUMdbMeM0hslq+wtxqPZMNPylxMxqjox1aCjGP3Hh X-Received: by 2002:a17:907:988:b0:94e:dc3c:cca2 with SMTP id bf8-20020a170907098800b0094edc3ccca2mr3702793ejc.70.1682662456827; Thu, 27 Apr 2023 23:14:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682662456; cv=none; d=google.com; s=arc-20160816; b=HtiSe9wvRGgiZkKVNEjsRWWa5u7bWQOL4ZCEVCk4UfbSsi/sVtzVeki+QwQRp5VGOv N2zI2PAAzq6k7DdFgao0z4pHOdle6rUMxCKjzX/cV+J3a50lft6dYWZpoPuV0XHaVQf0 X1zyoZnpHkRS2jPeMLE9XbFpbAeySOp6tYQf3CT2TxNvy/jNSf4iacl5TSUQp3pJsQqQ bCFyW2blxI8wGKpUHv9LaIJBCwmphKiv7a3p4geVWGkxUVccvZ7j+uQvdp2q8v3sXw7o xIXEBOUm2fSdVhmSY5/Ewx80Rzq2IyOHD+NwMowMiSSE2QHzsKvvq8kWJiZOQNe340N1 /7lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dmarc-filter:delivered-to; bh=0YQDf5xO5GsN4/iFlGZybwBeaMoRy8QmNAy3edT0ms0=; b=bFugqTx9/0zqsVaucnjgHIQY77EkI0Z3M9sKjdLz0TlMVnBK1mlNI8LqhVvO8RAuHW EaFH4qW1zTn/aET9VfXEV/hb9fjG41SHiWkFFqK8r99Nxgvr9ADFCwi5A3CMQpu6XMAi I5f6pmg2Dd1eImgt+bYRfu7hSvz6ZhqEJbfbS83lbbB1BWIft8gpqxH417QDiEIvvxMx 6+rcfGNNLYIbhgVT2hbzv/1nZrIeQ5XVtBR5PWJl8KUlpsSRTMUpHewt0rzhPYDxuGwc x+jml/QAbG73LW6t18wJrpkmh6zqywJA4uQ8Em87o16z3BNpf+P/sAqHMYDE7cW0Qpb3 jpiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vrull.eu header.s=google header.b=nvLfIPla; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id 30-20020a170906101e00b0095388a3c05bsi12073077ejm.1018.2023.04.27.23.14.16 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 23:14:16 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@vrull.eu header.s=google header.b=nvLfIPla; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 69D303881D1D for <ouuuleilei@gmail.com>; Fri, 28 Apr 2023 06:12:55 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id 5EF0F3858C31 for <gcc-patches@gcc.gnu.org>; Fri, 28 Apr 2023 06:12:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5EF0F3858C31 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5066ce4f490so13960357a12.2 for <gcc-patches@gcc.gnu.org>; Thu, 27 Apr 2023 23:12:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1682662339; x=1685254339; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0YQDf5xO5GsN4/iFlGZybwBeaMoRy8QmNAy3edT0ms0=; b=nvLfIPlaidR9GzYb4M4dskn0b+VAlaNFioa2UGHohDptjgRdgmHJjCJoo8ppfBrXvI v7lrzTB36KIgEZXrdbIIJBHh9r8VzEqrlCDG/I/L3YPerxJH28P7T+C2inqB+sH+ErOB w3ht2eJsk9XjivDY06kpU5ZhFljTEN8BpPYVt2esh4il27YHp7EA/OOmPczcHuHdjXYn sdp5s0LJYluRFQqDUIVyXOUS9QiVohXsS5N9X1LmMhE7oRH2i2IdWOqvQV/9uOQfV1es WrFauoBywxQMbT75kLbXmHihj87iLs+CHvrEbON2YhrFM9eEFVO3OyPuPRbej8vzY9TQ 6slA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682662339; x=1685254339; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0YQDf5xO5GsN4/iFlGZybwBeaMoRy8QmNAy3edT0ms0=; b=QAxps51Vn7olkynFqYtxtRR6Pmqkle4D+VfhKlvEwS+khF3ONnL4sLXrHZo59luqQf oOKkFRVSU4HWbM+3C396Uy3dFjEoHzwkbJI2lpE2qlnfqU/6pS4SpYMnnjsp8ehy0MwB Ie+Vu4AEu2ylIXF32CyZLBEMbtNFZH2yIooZDndoX6iCYzBMvgJWmCVw+Q0UQVDz0iad 9TPjcQkcvs4q/EOHmQRdIgXWTugPpk9KIV9spEgeGcylG9llrEEYtxbdfgKLM3DwlhVV AUAUvOk9kKQ7fjleqXzEYbz91IM+zGR1yaSVGUSJwGc89DQkl6pPrJzs3phIFyFZACeR f9ig== X-Gm-Message-State: AC+VfDwScMjcFbwF1NwLLbusITaTqI0wJM9aFhVzuBXZ0my7STU9fEv/ tAKUJ/+MwyGa3Kjry5qhWLv7oJwzJPwoDsqpshw= X-Received: by 2002:aa7:c7c1:0:b0:506:85d1:35c1 with SMTP id o1-20020aa7c7c1000000b0050685d135c1mr3282380eds.29.1682662339593; Thu, 27 Apr 2023 23:12:19 -0700 (PDT) Received: from beast.fritz.box (62-178-148-172.cable.dynamic.surfer.at. [62.178.148.172]) by smtp.gmail.com with ESMTPSA id x20-20020aa7d394000000b00504803f4071sm8669431edq.44.2023.04.27.23.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 23:12:19 -0700 (PDT) From: Christoph Muellner <christoph.muellner@vrull.eu> To: gcc-patches@gcc.gnu.org, Kito Cheng <kito.cheng@sifive.com>, Jim Wilson <jim.wilson.gcc@gmail.com>, Palmer Dabbelt <palmer@dabbelt.com>, Andrew Waterman <andrew@sifive.com>, Philipp Tomsich <philipp.tomsich@vrull.eu>, Cooper Qu <cooper.qu@linux.alibaba.com>, Lifang Xia <lifang_xia@linux.alibaba.com>, Yunhai Shang <yunhai@linux.alibaba.com>, Zhiwei Liu <zhiwei_liu@linux.alibaba.com> Cc: =?utf-8?q?Christoph_M=C3=BCllner?= <christoph.muellner@vrull.eu> Subject: [PATCH 04/11] riscv: thead: Adjust constraints of th_addsl INSN Date: Fri, 28 Apr 2023 08:12:05 +0200 Message-Id: <20230428061210.2988035-5-christoph.muellner@vrull.eu> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230428061210.2988035-1-christoph.muellner@vrull.eu> References: <20230428061210.2988035-1-christoph.muellner@vrull.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_MANYTO, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764399467969143250?= X-GMAIL-MSGID: =?utf-8?q?1764399467969143250?= |
Series |
Improvements for XThead* support
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Christoph Müllner
April 28, 2023, 6:12 a.m. UTC
From: Christoph Müllner <christoph.muellner@vrull.eu> A recent change adjusted the constraints of ZBA's shNadd INSN. Let's mirror this change here as well. gcc/ChangeLog: * config/riscv/thead.md: Adjust constraints of th_addsl. Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> --- gcc/config/riscv/thead.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Comments
LGTM, personally I also like this way too. On Fri, Apr 28, 2023 at 2:13 PM Christoph Muellner <christoph.muellner@vrull.eu> wrote: > > From: Christoph Müllner <christoph.muellner@vrull.eu> > > A recent change adjusted the constraints of ZBA's shNadd INSN. > Let's mirror this change here as well. > > gcc/ChangeLog: > > * config/riscv/thead.md: Adjust constraints of th_addsl. > > Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> > --- > gcc/config/riscv/thead.md | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/gcc/config/riscv/thead.md b/gcc/config/riscv/thead.md > index 6a06d0dfcf2..aa933960a98 100644 > --- a/gcc/config/riscv/thead.md > +++ b/gcc/config/riscv/thead.md > @@ -22,10 +22,9 @@ > (define_insn "*th_addsl<mode>4" > [(set (match_operand:X 0 "register_operand" "=r") > (plus:X (ashift:X (match_operand:X 1 "register_operand" "r") > - (match_operand 2 "const_int_operand" "n")) > + (match_operand:QI 2 "imm123_operand" "Ds3")) > (match_operand:X 3 "register_operand" "r")))] > - "TARGET_XTHEADBA > - && (INTVAL (operands[2]) >= 0) && (INTVAL (operands[2]) <= 3)" > + "TARGET_XTHEADBA" > "th.addsl\t%0,%3,%1,%2" > [(set_attr "type" "bitmanip") > (set_attr "mode" "<X:MODE>")]) > -- > 2.40.1 >
diff --git a/gcc/config/riscv/thead.md b/gcc/config/riscv/thead.md index 6a06d0dfcf2..aa933960a98 100644 --- a/gcc/config/riscv/thead.md +++ b/gcc/config/riscv/thead.md @@ -22,10 +22,9 @@ (define_insn "*th_addsl<mode>4" [(set (match_operand:X 0 "register_operand" "=r") (plus:X (ashift:X (match_operand:X 1 "register_operand" "r") - (match_operand 2 "const_int_operand" "n")) + (match_operand:QI 2 "imm123_operand" "Ds3")) (match_operand:X 3 "register_operand" "r")))] - "TARGET_XTHEADBA - && (INTVAL (operands[2]) >= 0) && (INTVAL (operands[2]) <= 3)" + "TARGET_XTHEADBA" "th.addsl\t%0,%3,%1,%2" [(set_attr "type" "bitmanip") (set_attr "mode" "<X:MODE>")])