From: Dmitry Selyutin <ghostmansd@gmail.com>
To: binutils@sourceware.org
Cc: Alan Modra <amodra@gmail.com>,
Luke Kenneth Casson Leighton <luke.leighton@gmail.com>
Subject: Re: [PATCH] ppc/svp64: support svshape2 instruction
Date: Thu, 8 Sep 2022 21:34:32 +0300 [thread overview]
Message-ID: <CAMqzjeso4fOvRNRCwJtFFuewGTSBANvnVg+rO6c4VY9ufLH4+g@mail.gmail.com> (raw)
In-Reply-To: <20220908182530.118842-1-ghostmansd@gmail.com>
On Thu, Sep 8, 2022 at 9:26 PM Dmitry Selyutin <ghostmansd@gmail.com> wrote:
> + * 0b1000 and 0b1001 values are reserved for svshape2.
> + { 0xf, 7, insert_SVrm, extract_SVrm, 0 },
> const unsigned int num_powerpc_operands = (sizeof (powerpc_operands)
> @@ -4759,6 +4824,13 @@ const unsigned int num_powerpc_operands = (sizeof (powerpc_operands)
> | (((uint64_t)(xop)) & 0x3f))
> #define SVM_MASK SVM (0x3f, 0x3f)
>
> +/* An SVM2 form instruction. */
> +#define SVM2(op, xop) \
> + (OP (op) \
> + | (((((uint64_t)(xop)) >> 6) & 0x7) << 8) \
> + | (((uint64_t)(xop)) & 0x3f))
> +#define SVM2_MASK SVM2 (0x3f, 0x1ff)
>
> +{"svshape2", SVM2(22,281), SVM2_MASK, SVP64, PPCVLE, {SVo, yx10, rmm, SVd, sk, mm}},
> {"svshape", SVM(22,25), SVM_MASK, SVP64, PPCVLE, {SVxd, SVyd, SVzd, SVrm, vf}},
This is a tricky part. svshape2 shares some of its bits with svshape;
we reserve 0b1000 and 0b1001 values from svshape for svshape2.
I didn't find a clear way to express it other than custom callback and
powerpc_opcodes insertion order.
The order is significant; if svshape2 ends up after svshape, things
break, due to the fact that svshape opcode starts performing a loose
match.
Any ideas on how to refactor or improve it are more than desired.
--
Best regards,
Dmitry Selyutin
next prev parent reply other threads:[~2022-09-08 18:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-08 18:25 Dmitry Selyutin
2022-09-08 18:34 ` Dmitry Selyutin [this message]
2022-09-08 19:03 ` lkcl
2022-09-09 9:22 ` Dmitry Selyutin
2022-09-12 6:24 ` Jan Beulich
2022-09-12 8:43 ` Dmitry Selyutin
2022-09-12 10:30 ` lkcl
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=CAMqzjeso4fOvRNRCwJtFFuewGTSBANvnVg+rO6c4VY9ufLH4+g@mail.gmail.com \
--to=ghostmansd@gmail.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=luke.leighton@gmail.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).