public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] RISC-V: Enable RVC on ".option arch, +zca" etc.
@ 2023-07-25  2:28 Tsukasa OI
  0 siblings, 0 replies; only message in thread
From: Tsukasa OI @ 2023-07-25  2:28 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=695776dc2f43c56dd2ae2f7036fb7cf74e19b46b

commit 695776dc2f43c56dd2ae2f7036fb7cf74e19b46b
Author: Tsukasa OI <research_trasio@irq.a4lg.com>
Date:   Tue Jul 25 01:40:09 2023 +0000

    RISC-V: Enable RVC on ".option arch, +zca" etc.
    
    Since the 'Zca' extension is the new base of the compressed instructions,
    this commit enables RVC *also* when the 'Zca' extension is enabled
    via ".option arch" directive.
    
    gas/ChangeLog:
    
            * config/tc-riscv.c (s_riscv_option): Enable RVC also when the
            'Zca' extension is enabled after an ".option arch" directive.

Diff:
---
 gas/config/tc-riscv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index 80c14a3cd22..aaf8b9be64f 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -4376,7 +4376,8 @@ s_riscv_option (int x ATTRIBUTE_UNUSED)
       riscv_reset_subsets_list_arch_str ();
 
       riscv_set_rvc (false);
-      if (riscv_subset_supports (&riscv_rps_as, "c"))
+      if (riscv_subset_supports (&riscv_rps_as, "c")
+	  || riscv_subset_supports (&riscv_rps_as, "zca"))
 	riscv_set_rvc (true);
 
       if (riscv_subset_supports (&riscv_rps_as, "ztso"))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-25  2:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-25  2:28 [binutils-gdb] RISC-V: Enable RVC on ".option arch, +zca" etc 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).