public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kito Cheng <kito.cheng@gmail.com>
To: Fei Gao <gaofei@eswincomputing.com>
Cc: gcc-patches@gcc.gnu.org, palmer@dabbelt.com,
	jeffreyalaw@gmail.com,  sinan.lin@linux.alibaba.com,
	jiawei@iscas.ac.cn,  liaozhangjin@eswincomputing.com
Subject: Re: [PATCH 2/2] [RISC-V] support cm.push cm.pop cm.popret in zcmp
Date: Mon, 8 May 2023 10:48:06 +0800	[thread overview]
Message-ID: <CA+yXCZC++3e0yZk1a64HEVsy+Yzu=Y_LQootC8B9aeVe=cBZ+A@mail.gmail.com> (raw)
In-Reply-To: <20230506083939.22097-3-gaofei@eswincomputing.com>

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.

  reply	other threads:[~2023-05-08  2:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-06  8:39 [PATCH 0/2] RISC-V: support Zcmp extension Fei Gao
2023-05-06  8:39 ` [PATCH 1/2] [RISC-V] disable shrink-wrap-separate if zcmp enabled Fei Gao
2023-05-08  2:41   ` Kito Cheng
2023-05-08  7:39     ` Fei Gao
2023-05-08  7:54   ` Andrew Pinski
2023-05-08  8:05     ` Kito Cheng
2023-05-08  8:54       ` Fei Gao
2023-05-08  9:20         ` Kito Cheng
2023-05-10  9:33           ` Fei Gao
2023-05-06  8:39 ` [PATCH 2/2] [RISC-V] support cm.push cm.pop cm.popret in zcmp Fei Gao
2023-05-08  2:48   ` Kito Cheng [this message]
2023-05-10  9:34     ` Fei Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+yXCZC++3e0yZk1a64HEVsy+Yzu=Y_LQootC8B9aeVe=cBZ+A@mail.gmail.com' \
    --to=kito.cheng@gmail.com \
    --cc=gaofei@eswincomputing.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=jiawei@iscas.ac.cn \
    --cc=liaozhangjin@eswincomputing.com \
    --cc=palmer@dabbelt.com \
    --cc=sinan.lin@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).