From: Nelson Chu <nelson.chu@sifive.com>
To: binutils@sourceware.org, jimw@sifive.com, kito.cheng@sifive.com
Cc: nelson.chu@sifive.com, Cooper Qu <cooper.qu@linux.alibaba.com>
Subject: [committed 2/2] RISC-V: Fix wrong version number when arch contains 'p'.
Date: Tue, 28 Sep 2021 04:41:38 -0700 [thread overview]
Message-ID: <20210928114138.2049-2-nelson.chu@sifive.com> (raw)
In-Reply-To: <20210928114138.2049-1-nelson.chu@sifive.com>
From: Cooper Qu <cooper.qu@linux.alibaba.com>
When specify a default version for p extension in
riscv_supported_std_ext[](elfxx-riscv.c) and assembling with
-march=rv32imacp, the c extension's version in attribute will become
0p0, the expectation is 2p0.
TODO: Remember to add testcase when we have supported standrad p in
the future.
bfd/
PR gas/28372
* elfxx-riscv.c (riscv_parsing_subset_version): Break if p
represent the 'p' extension.
Change-Id: Ia4e0cf26f3d7d07acaee8cefd86707ecac663a59
---
bfd/elfxx-riscv.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index c3d019c03a6..044cc63d09e 100644
--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -1536,13 +1536,9 @@ riscv_parsing_subset_version (const char *p,
{
np = *(p + 1);
+ /* Might be beginning of `p` extension. */
if (!ISDIGIT (np))
- {
- /* Might be beginning of `p` extension. */
- *major_version = version;
- *minor_version = 0;
- return p;
- }
+ break;
*major_version = version;
major_p = false;
--
2.30.2
prev parent reply other threads:[~2021-09-28 11:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 11:41 [committed 1/2] RISC-V: Allow to add numbers in the prefixed extension names Nelson Chu
2021-09-28 11:41 ` Nelson Chu [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=20210928114138.2049-2-nelson.chu@sifive.com \
--to=nelson.chu@sifive.com \
--cc=binutils@sourceware.org \
--cc=cooper.qu@linux.alibaba.com \
--cc=jimw@sifive.com \
--cc=kito.cheng@sifive.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).