clang  8.0.0svn
Mips.h
Go to the documentation of this file.
1 //===--- Mips.h - Mips-specific Tool Helpers ----------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H
11 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H
12 
13 #include "clang/Driver/Driver.h"
14 #include "llvm/ADT/StringRef.h"
15 #include "llvm/ADT/Triple.h"
16 #include "llvm/Option/Option.h"
17 #include <string>
18 #include <vector>
19 
20 namespace clang {
21 namespace driver {
22 namespace tools {
23 
24 namespace mips {
25 typedef enum { Legacy = 1, Std2008 = 2 } IEEE754Standard;
26 
27 enum class FloatABI {
28  Invalid,
29  Soft,
30  Hard,
31 };
32 
33 IEEE754Standard getIEEE754Standard(StringRef &CPU);
34 bool hasCompactBranches(StringRef &CPU);
35 void getMipsCPUAndABI(const llvm::opt::ArgList &Args,
36  const llvm::Triple &Triple, StringRef &CPUName,
37  StringRef &ABIName);
38 void getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple,
39  const llvm::opt::ArgList &Args,
40  std::vector<StringRef> &Features);
41 StringRef getGnuCompatibleMipsABIName(StringRef ABI);
42 mips::FloatABI getMipsFloatABI(const Driver &D, const llvm::opt::ArgList &Args);
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 llvm::opt::ArgList &Args, const llvm::Triple &Triple);
48 bool isFP64ADefault(const llvm::Triple &Triple, StringRef CPUName);
49 bool isFPXXDefault(const llvm::Triple &Triple, StringRef CPUName,
50  StringRef ABIName, mips::FloatABI FloatABI);
51 bool shouldUseFPXX(const llvm::opt::ArgList &Args, const llvm::Triple &Triple,
52  StringRef CPUName, StringRef ABIName,
53  mips::FloatABI FloatABI);
54 bool supportsIndirectJumpHazardBarrier(StringRef &CPU);
55 
56 } // end namespace mips
57 } // end namespace target
58 } // end namespace driver
59 } // end namespace clang
60 
61 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H
bool shouldUseFPXX(const llvm::opt::ArgList &Args, const llvm::Triple &Triple, StringRef CPUName, StringRef ABIName, mips::FloatABI FloatABI)
IEEE754Standard getIEEE754Standard(StringRef &CPU)
Definition: Mips.cpp:391
bool isNaN2008(const llvm::opt::ArgList &Args, const llvm::Triple &Triple)
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:58
bool hasMipsAbiArg(const llvm::opt::ArgList &Args, const char *Value)
mips::FloatABI getMipsFloatABI(const Driver &D, const llvm::opt::ArgList &Args)
void getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args, std::vector< StringRef > &Features)
bool isUCLibc(const llvm::opt::ArgList &Args)
bool isFPXXDefault(const llvm::Triple &Triple, StringRef CPUName, StringRef ABIName, mips::FloatABI FloatABI)
Definition: Mips.cpp:458
bool supportsIndirectJumpHazardBarrier(StringRef &CPU)
Definition: Mips.cpp:494
Dataflow Directional Tag Classes.
bool hasCompactBranches(StringRef &CPU)
Definition: Mips.cpp:415
StringRef getGnuCompatibleMipsABIName(StringRef ABI)
Definition: Mips.cpp:144
bool isFP64ADefault(const llvm::Triple &Triple, StringRef CPUName)
Definition: Mips.cpp:448
void getMipsCPUAndABI(const llvm::opt::ArgList &Args, const llvm::Triple &Triple, StringRef &CPUName, StringRef &ABIName)
std::string getMipsABILibSuffix(const llvm::opt::ArgList &Args, const llvm::Triple &Triple)