]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Promote Zaamo/Zalrsc to a when using an old binutils
authorPatrick O'Neill <patrick@rivosinc.com>
Tue, 18 Jun 2024 21:40:15 +0000 (14:40 -0700)
committerPatrick O'Neill <patrick@rivosinc.com>
Wed, 19 Jun 2024 20:38:20 +0000 (13:38 -0700)
Binutils 2.42 and before don't support Zaamo/Zalrsc. When users specify
both Zaamo and Zalrsc, promote them to 'a' in the -march string.

This does not affect testsuite results for users with old versions of binutils.
Testcases that failed due to 'call'/isa string continue to fail after this PATCH
when using an old version of binutils.

gcc/ChangeLog:

* common/config/riscv/riscv-common.cc: Add 'a' extension to
riscv_combine_info.

Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
gcc/common/config/riscv/riscv-common.cc

index 1dc1d9904c7bde99635cc7f3a185ec5689f530de..410e673f5e01706c4a9e8c68a09c507455be8d3d 100644 (file)
@@ -401,6 +401,7 @@ static const struct riscv_ext_version riscv_ext_version_table[] =
 /* Combine extensions defined in this table  */
 static const struct riscv_ext_version riscv_combine_info[] =
 {
+  {"a", ISA_SPEC_CLASS_20191213, 2, 1},
   {"zk",  ISA_SPEC_CLASS_NONE, 1, 0},
   {"zkn",  ISA_SPEC_CLASS_NONE, 1, 0},
   {"zks",  ISA_SPEC_CLASS_NONE, 1, 0},