From: Jeff Law <jeffreyalaw@gmail.com>
To: "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>,
wangfeng <wangfeng@eswincomputing.com>,
gcc-patches <gcc-patches@gcc.gnu.org>
Cc: "kito.cheng" <kito.cheng@gmail.com>
Subject: Re: [PATCH v5 2/3] RISC-V: Add crypto machine descriptions
Date: Thu, 21 Dec 2023 12:10:42 -0700 [thread overview]
Message-ID: <4f635630-350d-41a6-9017-77b8e50eccd1@gmail.com> (raw)
In-Reply-To: <8F26F2A041E40678+2023122111501272800736@rivai.ai>
On 12/20/23 20:50, juzhe.zhong@rivai.ai wrote:
> + (and:VI
> + (match_operand:VI 3 "register_operand" "vr, vr, vr, vr")
> + (not:VI (match_operand:VI 4 "register_operand" "vr, vr, vr, vr")))
>
> This order should be swapped like ARM SVE:
>
> (define_expand "@cond_bic<mode>"
> [(set (match_operand:SVE_FULL_I 0 "register_operand")
> (unspec:SVE_FULL_I
> [(match_operand:<VPRED> 1 "register_operand")
> (and:SVE_FULL_I
> (not:SVE_FULL_I (match_operand:SVE_FULL_I 3 "register_operand"))
> (match_operand:SVE_FULL_I 2 "register_operand"))
> (match_operand:SVE_FULL_I 4 "aarch64_simd_reg_or_zero")]
> UNSPEC_SEL))]
> "TARGET_SVE"
> )
Correct. This case is even noted in the internals manual ;-)
> A machine that has an instruction that performs a bitwise logical-and of one
> operand with the bitwise negation of the other should specify the pattern
> for that instruction as
>
> @smallexample
> (define_insn ""
> [(set (match_operand:@var{m} 0 @dots{})
> (and:@var{m} (not:@var{m} (match_operand:@var{m} 1 @dots{}))
> (match_operand:@var{m} 2 @dots{})))]
> "@dots{}"
> "@dots{}")
> @end smallexample
Jeff
prev parent reply other threads:[~2023-12-21 19:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 2:48 Feng Wang
2023-12-21 3:50 ` juzhe.zhong
2023-12-21 19:10 ` Jeff Law [this message]
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=4f635630-350d-41a6-9017-77b8e50eccd1@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=juzhe.zhong@rivai.ai \
--cc=kito.cheng@gmail.com \
--cc=wangfeng@eswincomputing.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).