clang  6.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 bool isMipsArch(llvm::Triple::ArchType Arch);
25 
26 namespace mips {
27 typedef enum { Legacy = 1, Std2008 = 2 } IEEE754Standard;
28 
29 enum class FloatABI {
30  Invalid,
31  Soft,
32  Hard,
33 };
34 
35 IEEE754Standard getIEEE754Standard(StringRef &CPU);
36 bool hasCompactBranches(StringRef &CPU);
37 void getMipsCPUAndABI(const llvm::opt::ArgList &Args,
38  const llvm::Triple &Triple, StringRef &CPUName,
39  StringRef &ABIName);
40 void getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple,
41  const llvm::opt::ArgList &Args,
42  std::vector<StringRef> &Features);
43 StringRef getGnuCompatibleMipsABIName(StringRef ABI);
44 mips::FloatABI getMipsFloatABI(const Driver &D, const llvm::opt::ArgList &Args);
45 std::string getMipsABILibSuffix(const llvm::opt::ArgList &Args,
46  const llvm::Triple &Triple);
47 bool hasMipsAbiArg(const llvm::opt::ArgList &Args, const char *Value);
48 bool isUCLibc(const llvm::opt::ArgList &Args);
49 bool isNaN2008(const llvm::opt::ArgList &Args, const llvm::Triple &Triple);
50 bool isFP64ADefault(const llvm::Triple &Triple, StringRef CPUName);
51 bool isFPXXDefault(const llvm::Triple &Triple, StringRef CPUName,
52  StringRef ABIName, mips::FloatABI FloatABI);
53 bool shouldUseFPXX(const llvm::opt::ArgList &Args, const llvm::Triple &Triple,
54  StringRef CPUName, StringRef ABIName,
55  mips::FloatABI FloatABI);
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
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:348
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:65
bool hasMipsAbiArg(const llvm::opt::ArgList &Args, const char *Value)
mips::FloatABI getMipsFloatABI(const Driver &D, const llvm::opt::ArgList &Args)
bool isMipsArch(llvm::Triple::ArchType Arch)
Definition: Mips.cpp:23
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:415
Dataflow Directional Tag Classes.
bool hasCompactBranches(StringRef &CPU)
Definition: Mips.cpp:372
StringRef getGnuCompatibleMipsABIName(StringRef ABI)
Definition: Mips.cpp:138
bool isFP64ADefault(const llvm::Triple &Triple, StringRef CPUName)
Definition: Mips.cpp:405
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)