From: Tsukasa OI <a4lg@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] RISC-V: Implications from 'Zc[fd]' extensions
Date: Mon, 24 Jul 2023 23:43:48 +0000 (GMT) [thread overview]
Message-ID: <20230724234349.D12B63858C66@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6e30678feb8ab38ad80a589226c5d0e9c9dc399e
commit 6e30678feb8ab38ad80a589226c5d0e9c9dc399e
Author: Tsukasa OI <research_trasio@irq.a4lg.com>
Date: Mon Jul 24 05:09:39 2023 +0000
RISC-V: Implications from 'Zc[fd]' extensions
The version 1.0.4-1 of the code size reduction specification clarifies
that 'Zcf' implies 'F' and 'Zcd' implies 'D'.
cf:
<https://github.com/riscv/riscv-code-size-reduction/releases/tag/v1.0.4-1>
This commit adds those implications.
bfd/ChangeLog:
* elfxx-riscv.c (riscv_implicit_subsets): Add two implications,
'Zcf' -> 'F' and 'Zcd' -> 'D'.
gas/ChangeLog:
* testsuite/gas/riscv/march-imply-zcd.d: New test.
* testsuite/gas/riscv/march-imply-zcf.d: New test.
Diff:
---
bfd/elfxx-riscv.c | 2 ++
gas/testsuite/gas/riscv/march-imply-zcd.d | 6 ++++++
gas/testsuite/gas/riscv/march-imply-zcf.d | 6 ++++++
3 files changed, 14 insertions(+)
diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index eaf496649db..b43d2cfa0fa 100644
--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -1132,6 +1132,8 @@ static struct riscv_implicit_subset riscv_implicit_subsets[] =
{"zvl256b", "zvl128b", check_implicit_always},
{"zvl128b", "zvl64b", check_implicit_always},
{"zvl64b", "zvl32b", check_implicit_always},
+ {"zcd", "d", check_implicit_always},
+ {"zcf", "f", check_implicit_always},
{"zfa", "f", check_implicit_always},
{"d", "f", check_implicit_always},
{"zfh", "zfhmin", check_implicit_always},
diff --git a/gas/testsuite/gas/riscv/march-imply-zcd.d b/gas/testsuite/gas/riscv/march-imply-zcd.d
new file mode 100644
index 00000000000..e7c75f649a8
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-imply-zcd.d
@@ -0,0 +1,6 @@
+#as: -march=rv32i_zcd -march-attr -misa-spec=20191213
+#readelf: -A
+#source: empty.s
+Attribute Section: riscv
+File Attributes
+ Tag_RISCV_arch: "rv32i2p1_f2p2_d2p2_zicsr2p0_zca1p0_zcd1p0"
diff --git a/gas/testsuite/gas/riscv/march-imply-zcf.d b/gas/testsuite/gas/riscv/march-imply-zcf.d
new file mode 100644
index 00000000000..3829637a16f
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-imply-zcf.d
@@ -0,0 +1,6 @@
+#as: -march=rv32i_zcf -march-attr -misa-spec=20191213
+#readelf: -A
+#source: empty.s
+Attribute Section: riscv
+File Attributes
+ Tag_RISCV_arch: "rv32i2p1_f2p2_zicsr2p0_zca1p0_zcf1p0"
reply other threads:[~2023-07-24 23:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230724234349.D12B63858C66@sourceware.org \
--to=a4lg@sourceware.org \
--cc=bfd-cvs@sourceware.org \
/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).