diff options
author | Kito Cheng <kito.cheng@gmail.com> | 2017-01-03 17:42:01 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-01-03 17:42:01 +0000 |
commit | cc917fd93d2a836adfd61b91df021cf835e88fd1 (patch) | |
tree | 27bd4adc36ad4418cd312b6b3552df1f650287e1 /gas | |
parent | de1010f40884537cf0905ad134162cd2db71dc2a (diff) | |
download | gdb-cc917fd93d2a836adfd61b91df021cf835e88fd1.zip gdb-cc917fd93d2a836adfd61b91df021cf835e88fd1.tar.gz gdb-cc917fd93d2a836adfd61b91df021cf835e88fd1.tar.bz2 |
Add support for the Q extension to the RISCV ISA.
gas * config/tc-riscv.c (riscv_set_arch): Whitelist the "q" ISA
extension.
(riscv_after_parse_args): Set FLOAT_ABI_QUAD when the Q ISA is
enabled and no other ABI is specified.
include * opcode/riscv-opc.h: Add support for the "q" ISA extension.
opcodes * riscv-opc.c (riscv-opcodes): Add support for the "q" ISA
extension.
* riscv-opcodes/all-opcodes: Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-riscv.c | 14 |
2 files changed, 19 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index fccd817..c6cab9a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2017-01-03 Kito Cheng <kito.cheng@gmail.com> + + * config/tc-riscv.c (riscv_set_arch): Whitelist the "q" ISA + extension. + (riscv_after_parse_args): Set FLOAT_ABI_QUAD when the Q ISA is + enabled and no other ABI is specified. + 2017-01-03 Dimitar Dimitrov <dimitar@dinux.eu> * config/tc-pru.c (md_number_to_chars): Fix parameter to be diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index 7f3b6cf..1f61730 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -197,6 +197,12 @@ 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); } @@ -1817,8 +1823,12 @@ riscv_after_parse_args (void) float_abi = FLOAT_ABI_SOFT; for (subset = riscv_subsets; subset != NULL; subset = subset->next) - if (strcasecmp (subset->name, "D") == 0) - float_abi = FLOAT_ABI_DOUBLE; + { + if (strcasecmp (subset->name, "D") == 0) + float_abi = FLOAT_ABI_DOUBLE; + if (strcasecmp (subset->name, "Q") == 0) + float_abi = FLOAT_ABI_QUAD; + } } /* Insert float_abi into the EF_RISCV_FLOAT_ABI field of elf_flags. */ |