[clang] 20af0e5 - Enable v for RISCV64 Android (#69261)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 17 08:52:59 PDT 2023
Author: AdityaK
Date: 2023-10-17T08:52:55-07:00
New Revision: 20af0e5e8d5692327753286ac869ff1c347d819b
URL: https://github.com/llvm/llvm-project/commit/20af0e5e8d5692327753286ac869ff1c347d819b
DIFF: https://github.com/llvm/llvm-project/commit/20af0e5e8d5692327753286ac869ff1c347d819b.diff
LOG: Enable v for RISCV64 Android (#69261)
Android has already enabled V by default for aosp:
https://android-review.googlesource.com/c/platform/build/soong/+/2752805
four weeks back.
Added:
Modified:
clang/lib/Driver/ToolChains/Arch/RISCV.cpp
clang/test/Driver/riscv-features.c
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Arch/RISCV.cpp b/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
index bb097356d0c1269..a05f4b7ea64b487 100644
--- a/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
+++ b/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
@@ -309,7 +309,7 @@ StringRef riscv::getRISCVArch(const llvm::opt::ArgList &Args,
return "rv32imafdc";
else if (MABI.starts_with_insensitive("lp64")) {
if (Triple.isAndroid())
- return "rv64imafdc_zba_zbb_zbs";
+ return "rv64imafdcv_zba_zbb_zbs";
return "rv64imafdc";
}
@@ -329,7 +329,7 @@ StringRef riscv::getRISCVArch(const llvm::opt::ArgList &Args,
if (Triple.getOS() == llvm::Triple::UnknownOS)
return "rv64imac";
else if (Triple.isAndroid())
- return "rv64imafdc_zba_zbb_zbs";
+ return "rv64imafdcv_zba_zbb_zbs";
else
return "rv64imafdc";
}
diff --git a/clang/test/Driver/riscv-features.c b/clang/test/Driver/riscv-features.c
index 0039c230ec476fb..851a7c0507eb3a3 100644
--- a/clang/test/Driver/riscv-features.c
+++ b/clang/test/Driver/riscv-features.c
@@ -10,6 +10,7 @@
// RUN: %clang --target=riscv32-unknown-elf -### %s -mrelax 2>&1 | FileCheck %s -check-prefix=RELAX
// RUN: %clang --target=riscv32-unknown-elf -### %s -mno-relax 2>&1 | FileCheck %s -check-prefix=NO-RELAX
+// ANDROID: "-target-feature" "+v"
// ANDROID: "-target-feature" "+zba"
// ANDROID: "-target-feature" "+zbb"
// ANDROID: "-target-feature" "+zbs"
More information about the cfe-commits
mailing list