This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/2] RISC-V: Don't treat Q extension as special case


From: Andrew Waterman <andrew@sifive.com>

gas/ChangeLog

2017-07-26  Andrew Waterman  <andrew@sifive.com>

        * config/tc-riscv.c (riscv_set_arch): Handle the Q subset like
        all other subsets.
---
 gas/config/tc-riscv.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index 8bf0db5e78..2ef32495d3 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -147,7 +147,7 @@ riscv_add_subset (const char *subset)
 static void
 riscv_set_arch (const char *s)
 {
-  const char *all_subsets = "imafdc";
+  const char *all_subsets = "imafdqc";
   const char *extension = NULL;
   const char *p = s;
 
@@ -173,7 +173,7 @@ riscv_set_arch (const char *s)
 
       case 'g':
 	p++;
-	for ( ; *all_subsets != 'c'; all_subsets++)
+	for ( ; *all_subsets != 'q'; all_subsets++)
 	  {
 	    const char subset[] = {*all_subsets, '\0'};
 	    riscv_add_subset (subset);
@@ -210,12 +210,6 @@ riscv_set_arch (const char *s)
 	  all_subsets++;
 	  p++;
 	}
-      else if (*p == 'q')
-	{
-	  const char subset[] = {*p, 0};
-	  riscv_add_subset (subset);
-	  p++;
-	}
       else
 	as_fatal ("-march=%s: unsupported ISA subset `%c'", s, *p);
     }
-- 
2.13.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]