This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 2/2] RISC-V: Don't treat Q extension as special case
- From: Palmer Dabbelt <palmer at dabbelt dot com>
- To: binutils at sourceware dot org, klauskpedersen at rdamicro dot com
- Cc: patches at groups dot riscv dot org, Andrew Waterman <andrew at sifive dot com>
- Date: Thu, 27 Jul 2017 08:44:16 -0700
- Subject: [PATCH 2/2] RISC-V: Don't treat Q extension as special case
- Authentication-results: sourceware.org; auth=none
- References: <20170727154416.26724-1-palmer@dabbelt.com>
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