diff options
author | Edwin Lu <ewlu@rivosinc.com> | 2024-07-24 16:37:18 -0700 |
---|---|---|
committer | Edwin Lu <ewlu@rivosinc.com> | 2024-07-30 10:56:58 -0700 |
commit | 7ef8a9d4b1cea3fea3791859074df79b71abd549 (patch) | |
tree | 489b25ab6a4a14ff1402015feca74833afb2008d /gcc/common | |
parent | ee12a13d25778a1ad8a9b5dc63aadf9f4320088b (diff) | |
download | gcc-7ef8a9d4b1cea3fea3791859074df79b71abd549.zip gcc-7ef8a9d4b1cea3fea3791859074df79b71abd549.tar.gz gcc-7ef8a9d4b1cea3fea3791859074df79b71abd549.tar.bz2 |
RISC-V: Add configure check for B extention support
Binutils 2.42 and before don't recognize the b extension in the march
strings even though it supports zba_zbb_zbs. Add a configure check to
ignore the b in the march string if found.
gcc/ChangeLog:
* common/config/riscv/riscv-common.cc (riscv_subset_list::to_string):
Skip b in march string
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac: Add B assembler check
Signed-off-by: Edwin Lu <ewlu@rivosinc.com>
Diffstat (limited to 'gcc/common')
-rw-r--r-- | gcc/common/config/riscv/riscv-common.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc index 0c12e12..1944c778 100644 --- a/gcc/common/config/riscv/riscv-common.cc +++ b/gcc/common/config/riscv/riscv-common.cc @@ -858,6 +858,7 @@ riscv_subset_list::to_string (bool version_p) const bool skip_zifencei = false; bool skip_zaamo_zalrsc = false; bool skip_zicsr = false; + bool skip_b = false; bool i2p0 = false; /* For RISC-V ISA version 2.2 or earlier version, zicsr and zifencei is @@ -890,6 +891,10 @@ riscv_subset_list::to_string (bool version_p) const for users with an older version of binutils. */ skip_zaamo_zalrsc = true; #endif +#ifndef HAVE_AS_MARCH_B + /* Skip since binutils 2.42 and earlier don't recognize b. */ + skip_b = true; +#endif for (subset = m_head; subset != NULL; subset = subset->next) { @@ -907,6 +912,9 @@ riscv_subset_list::to_string (bool version_p) const if (skip_zaamo_zalrsc && subset->name == "zalrsc") continue; + if (skip_b && subset->name == "b") + continue; + /* For !version_p, we only separate extension with underline for multi-letter extension. */ if (!first && |