* [binutils-gdb] RISC-V: Set EF_RISCV_TSO also on .option arch
@ 2022-09-21 8:10 Tsukasa OI
0 siblings, 0 replies; only message in thread
From: Tsukasa OI @ 2022-09-21 8:10 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=acab2a6872db8e6ebab3e91bc22a4df384d1c8ed
commit acab2a6872db8e6ebab3e91bc22a4df384d1c8ed
Author: Tsukasa OI <research_trasio@irq.a4lg.com>
Date: Wed Sep 21 06:23:55 2022 +0000
RISC-V: Set EF_RISCV_TSO also on .option arch
This is a minor fix to commit 96462b012988d35ebb1137a2ad9fd0a96547d79a
("RISC-V: Implement Ztso extension"). Currently, it sets EF_RISCV_TSO ELF
flag when initial ISA string contains the 'Ztso' extension. However, GAS
has a way to update the ISA string: ".option arch".
When the architecture is updated by ".option arch", EF_RISCV_RVC ELF flag
is set when the 'C' extension is detected. Analogously, this commit sets
the EF_RISCV_TSO when the 'Ztso' extension is detected.
gas/ChangeLog:
* config/tc-riscv.c (s_riscv_option): Set TSO ELF flag if the
'Ztso' extension is specified via ".option arch" directive.
Diff:
---
gas/config/tc-riscv.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index b1abc8553b0..42d7bf62e4f 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -3888,6 +3888,9 @@ s_riscv_option (int x ATTRIBUTE_UNUSED)
riscv_set_rvc (false);
if (riscv_subset_supports (&riscv_rps_as, "c"))
riscv_set_rvc (true);
+
+ if (riscv_subset_supports (&riscv_rps_as, "ztso"))
+ riscv_set_tso ();
}
else if (strcmp (name, "push") == 0)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-21 8:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 8:10 [binutils-gdb] RISC-V: Set EF_RISCV_TSO also on .option arch Tsukasa OI
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).