diff options
author | Nelson Chu <nelson.chu@sifive.com> | 2020-11-20 15:35:17 +0800 |
---|---|---|
committer | Nelson Chu <nelson.chu@sifive.com> | 2020-12-01 15:11:30 +0800 |
commit | 5a1b31e1e1cee6e9f1c92abff59cdcfff0dddf30 (patch) | |
tree | d531eba64273f93e572e27c610ddab9013bd0389 /gas | |
parent | e8d4709e6a5f4e3fad8479b8069c52294be54488 (diff) | |
download | gdb-5a1b31e1e1cee6e9f1c92abff59cdcfff0dddf30.zip gdb-5a1b31e1e1cee6e9f1c92abff59cdcfff0dddf30.tar.gz gdb-5a1b31e1e1cee6e9f1c92abff59cdcfff0dddf30.tar.bz2 |
RISC-V: Add zifencei and prefixed h class extensions.
bfd/
* elfxx-riscv.c (riscv_parse_std_ext): Stop parsing standard
extensions when parsed h keyword.
(riscv_get_prefix_class): Support prefixed h class.
(riscv_std_h_ext_strtab): Likewise.
(riscv_ext_h_valid_p): Likewise.
(parse_config): Likewise.
(riscv_std_z_ext_strtab): Add zifencei.
* elfxx-riscv.h (riscv_isa_ext_class): Add RV_ISA_CLASS_H.
gas/
* testsuite/gas/riscv/march-fail-order-z.d: New testcase, check
orders of prefixed z extensions.
* testsuite/gas/riscv/march-fail-order-z.l: Likewise.
* testsuite/gas/riscv/march-fail-single-char-h.d: New testcase.
* testsuite/gas/riscv/march-fail-single-char.l: Updated.
* testsuite/gas/riscv/march-fail-unknown-h.d: New testcase.
* testsuite/gas/riscv/march-fail-unknown.l: Updated.
opcodes/
* riscv-opc.c (riscv_ext_version_table): Add zifencei.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/march-fail-order-z.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/march-fail-order-z.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/march-fail-single-char-h.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/march-fail-single-char.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/march-fail-unknown-h.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/march-fail-unknown.l | 2 |
7 files changed, 23 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 2a2b593..64d2fa7 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,15 @@ 2020-12-01 Nelson Chu <nelson.chu@sifive.com> + * testsuite/gas/riscv/march-fail-order-z.d: New testcase, check + orders of prefixed z extensions. + * testsuite/gas/riscv/march-fail-order-z.l: Likewise. + * testsuite/gas/riscv/march-fail-single-char-h.d: New testcase. + * testsuite/gas/riscv/march-fail-single-char.l: Updated. + * testsuite/gas/riscv/march-fail-unknown-h.d: New testcase. + * testsuite/gas/riscv/march-fail-unknown.l: Updated. + +2020-12-01 Nelson Chu <nelson.chu@sifive.com> + * testsuite/gas/riscv/march-fail-uppercase-base.d: Updated. * testsuite/gas/riscv/march-fail-uppercase.l: Updated. * testsuite/gas/riscv/march-fail-uppercase-x.d: New testcase. diff --git a/gas/testsuite/gas/riscv/march-fail-order-z.d b/gas/testsuite/gas/riscv/march-fail-order-z.d new file mode 100644 index 0000000..dd076c6 --- /dev/null +++ b/gas/testsuite/gas/riscv/march-fail-order-z.d @@ -0,0 +1,3 @@ +#as: -march=rv32i_zifencei2p0_zicsr2p0 +#source: empty.s +#error_output: march-fail-order-z.l diff --git a/gas/testsuite/gas/riscv/march-fail-order-z.l b/gas/testsuite/gas/riscv/march-fail-order-z.l new file mode 100644 index 0000000..1129219 --- /dev/null +++ b/gas/testsuite/gas/riscv/march-fail-order-z.l @@ -0,0 +1,2 @@ +.*Assembler messages: +.*Fatal error: .*z ISA extension `zicsr' is not in alphabetical order. It must come before `zifencei' diff --git a/gas/testsuite/gas/riscv/march-fail-single-char-h.d b/gas/testsuite/gas/riscv/march-fail-single-char-h.d new file mode 100644 index 0000000..7fca957 --- /dev/null +++ b/gas/testsuite/gas/riscv/march-fail-single-char-h.d @@ -0,0 +1,3 @@ +#as: -march=rv32ih +#source: empty.s +#error_output: march-fail-single-char.l diff --git a/gas/testsuite/gas/riscv/march-fail-single-char.l b/gas/testsuite/gas/riscv/march-fail-single-char.l index aa87a8d..6466e16 100644 --- a/gas/testsuite/gas/riscv/march-fail-single-char.l +++ b/gas/testsuite/gas/riscv/march-fail-single-char.l @@ -1,2 +1,2 @@ .*Assembler messages: -.*Fatal error: .*unknown (s|z|x) ISA extension `(s|z|x)' +.*Fatal error: .*unknown (s|h|z|x) ISA extension `(s|h|z|x)' diff --git a/gas/testsuite/gas/riscv/march-fail-unknown-h.d b/gas/testsuite/gas/riscv/march-fail-unknown-h.d new file mode 100644 index 0000000..b0b8323 --- /dev/null +++ b/gas/testsuite/gas/riscv/march-fail-unknown-h.d @@ -0,0 +1,3 @@ +#as: -march=rv32ihfoo2p0 +#source: empty.s +#error_output: march-fail-unknown.l diff --git a/gas/testsuite/gas/riscv/march-fail-unknown.l b/gas/testsuite/gas/riscv/march-fail-unknown.l index ac22fe6..28a864d 100644 --- a/gas/testsuite/gas/riscv/march-fail-unknown.l +++ b/gas/testsuite/gas/riscv/march-fail-unknown.l @@ -1,2 +1,2 @@ .*Assembler messages: -.*Fatal error: .*unknown (s|z) ISA extension `(s|z)foo' +.*Fatal error: .*unknown (s|h|z) ISA extension `(s|h|z)foo' |