Author: Kito Cheng Date: 2022-10-27T23:53:32+08:00 New Revision: ae116f43ff140edfae166370ab6bc9ae3f556710
URL: https://github.com/llvm/llvm-project/commit/ae116f43ff140edfae166370ab6bc9ae3f556710 DIFF: https://github.com/llvm/llvm-project/commit/ae116f43ff140edfae166370ab6bc9ae3f556710.diff LOG: [RISCV] Drop single letter b extension support It splited into several zb* extensions, and `b` is dropped after 0.93, so it time to retired that as other non-ratified zb* extensions. Currntly clang can accept that with warning: $ clang -target riscv64-elf ~/hello.c -S -march=rv64gcb '+b' is not a recognized feature for this target (ignoring feature) '+b' is not a recognized feature for this target (ignoring feature) '+b' is not a recognized feature for this target (ignoring feature) Reviewed By: asb, luismarques Differential Revision: https://reviews.llvm.org/D136812 Added: Modified: clang/test/Driver/riscv-arch.c llvm/lib/Support/RISCVISAInfo.cpp Removed: ################################################################################ diff --git a/clang/test/Driver/riscv-arch.c b/clang/test/Driver/riscv-arch.c index 7e86423aa157..cf38a3c07051 100644 --- a/clang/test/Driver/riscv-arch.c +++ b/clang/test/Driver/riscv-arch.c @@ -258,6 +258,11 @@ // RV32-STD: error: invalid arch name 'rv32imqc', // RV32-STD: unsupported standard user-level extension 'q' +// RUN: %clang --target=riscv32-unknown-elf -march=rv32ib -### %s \ +// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-B %s +// RV32-B: error: invalid arch name 'rv32ib', +// RV32-B: unsupported standard user-level extension 'b' + // RUN: %clang --target=riscv32-unknown-elf -march=rv32xabc -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32X %s // RV32X: error: invalid arch name 'rv32xabc', diff --git a/llvm/lib/Support/RISCVISAInfo.cpp b/llvm/lib/Support/RISCVISAInfo.cpp index 1a899616ade9..cf773dad47b6 100644 --- a/llvm/lib/Support/RISCVISAInfo.cpp +++ b/llvm/lib/Support/RISCVISAInfo.cpp @@ -602,8 +602,8 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension, // The order is OK, then push it into features. // TODO: Use version number when setting target features - // Currently LLVM supports only "mafdcbv". - StringRef SupportedStandardExtension = "mafdcbv"; + // Currently LLVM supports only "mafdcv". + StringRef SupportedStandardExtension = "mafdcv"; if (!SupportedStandardExtension.contains(C)) return createStringError(errc::invalid_argument, "unsupported standard user-level extension '%c'", _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits