aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/include/llvm/TargetParser
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-04-17 17:14:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-06-22 18:22:20 +0000
commit1ac55f4cb0001fed92329746c730aa9a947c09a5 (patch)
tree78b2d7f739b7a4b29aa297366416bf701b6ebde8 /contrib/llvm-project/llvm/include/llvm/TargetParser
parentbdd1243df58e60e85101c09001d9812a789b6bc4 (diff)
parent8a37c71e9d8855c91b9ef296ed389248f960bb52 (diff)
downloadsrc-1ac55f4cb0001fed92329746c730aa9a947c09a5.tar.gz
src-1ac55f4cb0001fed92329746c730aa9a947c09a5.zip
Diffstat (limited to 'contrib/llvm-project/llvm/include/llvm/TargetParser')
-rw-r--r--contrib/llvm-project/llvm/include/llvm/TargetParser/RISCVTargetParser.h5
-rw-r--r--contrib/llvm-project/llvm/include/llvm/TargetParser/Triple.h8
2 files changed, 13 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/TargetParser/RISCVTargetParser.h b/contrib/llvm-project/llvm/include/llvm/TargetParser/RISCVTargetParser.h
index da2ecd8c1339..f50576b8fee1 100644
--- a/contrib/llvm-project/llvm/include/llvm/TargetParser/RISCVTargetParser.h
+++ b/contrib/llvm-project/llvm/include/llvm/TargetParser/RISCVTargetParser.h
@@ -18,6 +18,9 @@
#include <vector>
namespace llvm {
+
+class Triple;
+
namespace RISCV {
// We use 64 bits as the known part in the scalable vector types.
@@ -38,6 +41,8 @@ void fillValidCPUArchList(SmallVectorImpl<StringRef> &Values, bool IsRV64);
void fillValidTuneCPUArchList(SmallVectorImpl<StringRef> &Values, bool IsRV64);
bool getCPUFeaturesExceptStdExt(CPUKind Kind, std::vector<StringRef> &Features);
+bool isX18ReservedByDefault(const Triple &TT);
+
} // namespace RISCV
} // namespace llvm
diff --git a/contrib/llvm-project/llvm/include/llvm/TargetParser/Triple.h b/contrib/llvm-project/llvm/include/llvm/TargetParser/Triple.h
index 8d600989c8cf..59513fa2f206 100644
--- a/contrib/llvm-project/llvm/include/llvm/TargetParser/Triple.h
+++ b/contrib/llvm-project/llvm/include/llvm/TargetParser/Triple.h
@@ -882,6 +882,14 @@ public:
return getArch() == Triple::ppc64 || getArch() == Triple::ppc64le;
}
+ /// Tests whether the target 64-bit PowerPC big endian ABI is ELFv2.
+ bool isPPC64ELFv2ABI() const {
+ return (getArch() == Triple::ppc64 &&
+ ((getOS() == Triple::FreeBSD &&
+ (getOSMajorVersion() >= 13 || getOSVersion().empty())) ||
+ getOS() == Triple::OpenBSD || isMusl()));
+ }
+
/// Tests whether the target is 32-bit RISC-V.
bool isRISCV32() const { return getArch() == Triple::riscv32; }