From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-xa2d.google.com (mail-vk1-xa2d.google.com [IPv6:2607:f8b0:4864:20::a2d]) by sourceware.org (Postfix) with ESMTPS id 6EBCF3858D32 for ; Mon, 8 May 2023 02:48:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6EBCF3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-vk1-xa2d.google.com with SMTP id 71dfb90a1353d-44fd9584f47so1404133e0c.0 for ; Sun, 07 May 2023 19:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683514098; x=1686106098; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=P0F+LMvySAV4A2j6oerjmRvfjBb8XTCRU3jPRMe7zL8=; b=cbkyjyzp/hqtHaWcqounJYyVzarygnvJNJ0u5C7XZr2LU7IqAQ1+ooKagqjUUenL6Z /mz953596Xv17zmKEDYzqEd5x/kSSPZI04oT5F0a85SKcCX5IH+Xkp6Pz7rqS3ADKN6D sLSSWxj3wlTXpm+fPe2wxLpKfkIAGbVoIIKGCbOP0zBr9K8XgbfHIVxbrvHeMdfT6k/l FReAAhAP47Ry6ROXytexnhb1UM7/45AuGrpu/BqV3Ci8BtQbkJMvwB8Vy52cUGB7PFBm 451nvvBukGsopZHpPG98ZD4iuNTsMbq7zmMFXCh8LdxLqEOjG8qxdW6X7ebA9dC/OSDM We+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683514098; x=1686106098; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=P0F+LMvySAV4A2j6oerjmRvfjBb8XTCRU3jPRMe7zL8=; b=euQYNtTswsStw6XcVBRN3IZOjnvO7j2p0xyiF2cumNcAcaHPW/MemE92bR3FKAeKMX sY2hrBlpyiBcvtIuiCDitAIT51oegNMEQZvaNvVxBtZfN6m+Ltv18SB0K0wUfXLlS12z Ou5tdTSWt9V1spGvMevHSC/ZAxa19GrWTmLtZMySrdzDtPc+1ASJeeO+FgbMah6sFoIa cw6kxPMoPx2BPonJjjQWu4dY0+uF2bOmfB0I9aB6y/AvZgViC3qiqywiZ5r8hdRNu2DO D8USQsAtp2Ez3KJbaPFv2KojPKdr1tsTQ2Z5uJ2q7wfFty++CZXlPLbMPjNICEWlarQa AkrA== X-Gm-Message-State: AC+VfDwiwlFm7AoTJCDl9HWOEvh8zSVDSY1xxRU2C1ReW7e2dDwxCrUg 0KFjOfOKgstiLz37CrBAdqvU4NERI/6yh5un6RM= X-Google-Smtp-Source: ACHHUZ6wqP5uLVvNzDzEmf39DkjXWLf9RVnx1jdygiUofr3x/6Q+qf/2WMVBfzDkwgyA0aDM8GkiGRC0xnPOlKkZK/4= X-Received: by 2002:a67:f786:0:b0:42c:567c:718e with SMTP id j6-20020a67f786000000b0042c567c718emr2612809vso.2.1683514098589; Sun, 07 May 2023 19:48:18 -0700 (PDT) MIME-Version: 1.0 References: <20230506083939.22097-1-gaofei@eswincomputing.com> <20230506083939.22097-3-gaofei@eswincomputing.com> In-Reply-To: <20230506083939.22097-3-gaofei@eswincomputing.com> From: Kito Cheng Date: Mon, 8 May 2023 10:48:06 +0800 Message-ID: Subject: Re: [PATCH 2/2] [RISC-V] support cm.push cm.pop cm.popret in zcmp To: Fei Gao Cc: gcc-patches@gcc.gnu.org, palmer@dabbelt.com, jeffreyalaw@gmail.com, sinan.lin@linux.alibaba.com, jiawei@iscas.ac.cn, liaozhangjin@eswincomputing.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,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 List-Id: diff --git a/gcc/config/riscv/zc.md b/gcc/config/riscv/zc.md new file mode 100644 index 00000000000..1c2f390269e --- /dev/null +++ b/gcc/config/riscv/zc.md @@ -0,0 +1,55 @@ ... +(define_insn "gpr_multi_pop" + [(unspec_volatile [(match_operand 0 "const_int_operand") + (match_operand 1 "const_int_operand")] + UNSPECV_GPR_MULTI_POP)] I would strongly suggest modeling the right memory and register access here correctly instead of using unspec, and same for other two patterns. That will help GCC know the semantics of this operation.