clang  14.0.0git
Mips.h
Go to the documentation of this file.
1 //===--- Mips.h - Mips-specific Tool Helpers ----------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H
11 
12 #include "clang/Driver/Driver.h"
13 #include "llvm/ADT/StringRef.h"
14 #include "llvm/ADT/Triple.h"
15 #include "llvm/Option/Option.h"
16 #include <string>
17 #include <vector>
18 
19 namespace clang {
20 namespace driver {
21 namespace tools {
22 
23 namespace mips {
24 typedef enum { Legacy = 1, Std2008 = 2 } IEEE754Standard;
25 
26 enum class FloatABI {
27  Invalid,
28  Soft,
29  Hard,
30 };
31 
32 IEEE754Standard getIEEE754Standard(StringRef &CPU);
33 bool hasCompactBranches(StringRef &CPU);
34 void getMipsCPUAndABI(const llvm::opt::ArgList &Args,
35  const llvm::Triple &Triple, StringRef &CPUName,
36  StringRef &ABIName);
37 void getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple,
38  const llvm::opt::ArgList &Args,
39  std::vector<StringRef> &Features);
40 StringRef getGnuCompatibleMipsABIName(StringRef ABI);
41 mips::FloatABI getMipsFloatABI(const Driver &D, const llvm::opt::ArgList &Args,
42  const llvm::Triple &Triple);
43 std::string getMipsABILibSuffix(const llvm::opt::ArgList &Args,
44  const llvm::Triple &Triple);
45 bool hasMipsAbiArg(const llvm::opt::ArgList &Args, const char *Value);
46 bool isUCLibc(const llvm::opt::ArgList &Args);
47 bool isNaN2008(const Driver &D, const llvm::opt::ArgList &Args,
48  const llvm::Triple &Triple);
49 bool isFP64ADefault(const llvm::Triple &Triple, StringRef CPUName);
50 bool isFPXXDefault(const llvm::Triple &Triple, StringRef CPUName,
51  StringRef ABIName, mips::FloatABI FloatABI);
52 bool shouldUseFPXX(const llvm::opt::ArgList &Args, const llvm::Triple &Triple,
53  StringRef CPUName, StringRef ABIName,
55 bool supportsIndirectJumpHazardBarrier(StringRef &CPU);
56 
57 } // end namespace mips
58 } // end namespace target
59 } // end namespace driver
60 } // end namespace clang
61 
62 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H
clang::driver::tools::mips::getGnuCompatibleMipsABIName
StringRef getGnuCompatibleMipsABIName(StringRef ABI)
Definition: Mips.cpp:143
clang::driver::tools::mips::getIEEE754Standard
IEEE754Standard getIEEE754Standard(StringRef &CPU)
Definition: Mips.cpp:402
Driver.h
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::driver::tools::mips::hasMipsAbiArg
bool hasMipsAbiArg(const llvm::opt::ArgList &Args, const char *Value)
clang::driver::tools::mips::getMIPSTargetFeatures
void getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args, std::vector< StringRef > &Features)
clang::driver::tools::mips::isNaN2008
bool isNaN2008(const Driver &D, const llvm::opt::ArgList &Args, const llvm::Triple &Triple)
clang::driver::tools::mips::IEEE754Standard
IEEE754Standard
Definition: Mips.h:24
clang::driver::tools::mips::Legacy
@ Legacy
Definition: Mips.h:24
clang::driver::tools::mips::hasCompactBranches
bool hasCompactBranches(StringRef &CPU)
Definition: Mips.cpp:426
clang::driver::tools::mips::FloatABI
FloatABI
Definition: Mips.h:26
Value
Value
Definition: UninitializedValues.cpp:102
clang::driver::tools::mips::isFP64ADefault
bool isFP64ADefault(const llvm::Triple &Triple, StringRef CPUName)
Definition: Mips.cpp:458
clang::driver::tools::mips::Std2008
@ Std2008
Definition: Mips.h:24
clang::driver::tools::mips::getMipsABILibSuffix
std::string getMipsABILibSuffix(const llvm::opt::ArgList &Args, const llvm::Triple &Triple)
clang::driver::tools::mips::getMipsCPUAndABI
void getMipsCPUAndABI(const llvm::opt::ArgList &Args, const llvm::Triple &Triple, StringRef &CPUName, StringRef &ABIName)
clang
Definition: CalledOnceCheck.h:17
clang::driver::Driver
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:59
clang::driver::tools::mips::isUCLibc
bool isUCLibc(const llvm::opt::ArgList &Args)
clang::driver::tools::mips::getMipsFloatABI
mips::FloatABI getMipsFloatABI(const Driver &D, const llvm::opt::ArgList &Args, const llvm::Triple &Triple)
clang::driver::tools::mips::FloatABI::Invalid
@ Invalid
clang::driver::tools::mips::FloatABI::Soft
@ Soft
clang::driver::tools::mips::FloatABI::Hard
@ Hard
clang::driver::tools::mips::supportsIndirectJumpHazardBarrier
bool supportsIndirectJumpHazardBarrier(StringRef &CPU)
Definition: Mips.cpp:504
clang::driver::tools::mips::shouldUseFPXX
bool shouldUseFPXX(const llvm::opt::ArgList &Args, const llvm::Triple &Triple, StringRef CPUName, StringRef ABIName, mips::FloatABI FloatABI)
clang::driver::tools::mips::isFPXXDefault
bool isFPXXDefault(const llvm::Triple &Triple, StringRef CPUName, StringRef ABIName, mips::FloatABI FloatABI)
Definition: Mips.cpp:468