From: Tsukasa OI <research_trasio@irq.a4lg.com>
To: Nelson Chu <nelson.chu@sifive.com>,
Kito Cheng <kito.cheng@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH 0/1] RISC-V: Add `OP_V' to .insn named opcodes
Date: Thu, 28 Jul 2022 20:46:52 +0900 [thread overview]
Message-ID: <287255b3-ab0c-1cf6-2681-e35fef1d8b05@irq.a4lg.com> (raw)
In-Reply-To: <cover.1657338695.git.research_trasio@irq.a4lg.com>
Ping.
I noticed that LLVM (14 or later) already implements this named opcode.
sample.s:
.attribute arch, "rv64gcv"
# Both vadd.vv v1,v2,v3
.insn r 0x57, 0, 1, x1, x3, x2
.insn r OP_V, 0, 1, x1, x3, x2
$ llvm-mc -filetype=obj -triple=riscv64 -o sample.o sample.s
$ riscv64-unknown-elf-objdump -d sample.o
(...)
0000000000000000 <.text>:
0: 022180d7 vadd.vv v1,v2,v3
4: 022180d7 vadd.vv v1,v2,v3
Even after this patch, following assembly file generates an error
(unlike LLVM). I'm going to raise an issue later.
sample2.s:
.attribute arch, "rv64gcv"
# vadd.vv v1,v2,v3 (okay on LLVM but error on Binutils)
.insn r OP_V, 0, 1, v1, v3, v2
Thanks,
Tsukasa
On 2022/07/09 12:51, Tsukasa OI wrote:
> Hello,
>
> This small patch adds OP_V to named opcode list for .insn directive.
>
> Tracker on GitHub:
> <https://github.com/a4lg/binutils-gdb/wiki/riscv_gas_insn_opv>
>
> Sidenote:
> I started listing my Binutils submissions on my GitHub Wiki:
> <https://github.com/a4lg/binutils-gdb/wiki/Patch-Queue>
> hoping that current status and conflicting patches are clear.
>
>
> OP-V (0x57) is an opcode for vector instructions (defined on now
> ratified V extension). It adds OP_V to named constants of .insn directive
> (note that replacing - with _ is standard on GNU Binutils' .insn).
>
> Although vector instruction encoding is not implemented in .insn directive,
> it will help future implementation of custom vector .insn.
>
> If Zp* extensions are ratified, we could add OP_P (0x77) likewise.
>
>
> Thanks,
> Tsukasa
>
>
>
>
> Tsukasa OI (1):
> RISC-V: Add `OP_V' to .insn named opcodes
>
> gas/config/tc-riscv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> base-commit: d2acd4b0c5bab349aaa152d60268bc144634a844
next prev parent reply other threads:[~2022-07-28 11:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-09 3:51 Tsukasa OI
2022-07-09 3:51 ` [PATCH 1/1] " Tsukasa OI
2022-07-28 11:46 ` Tsukasa OI [this message]
2022-07-28 12:35 ` [PATCH 0/1] " Kito Cheng
2022-07-28 13:02 ` [PATCH v2 " Tsukasa OI
2022-07-28 13:02 ` [PATCH v2 1/1] " Tsukasa OI
2022-07-28 13:29 ` Kito Cheng
2022-07-29 1:51 ` Nelson Chu
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=287255b3-ab0c-1cf6-2681-e35fef1d8b05@irq.a4lg.com \
--to=research_trasio@irq.a4lg.com \
--cc=binutils@sourceware.org \
--cc=kito.cheng@sifive.com \
--cc=nelson.chu@sifive.com \
--cc=palmer@dabbelt.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).