1 //===--- Mips.h - Mips-specific Tool Helpers ----------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H
11 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H
13 #include "clang/Driver/Driver.h"
14 #include "llvm/ADT/StringRef.h"
15 #include "llvm/ADT/Triple.h"
16 #include "llvm/Option/Option.h"
24 bool isMipsArch(llvm::Triple::ArchType Arch);
27 typedef enum { Legacy = 1, Std2008 = 2 } IEEE754Standard;
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,
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 bool supportsIndirectJumpHazardBarrier(StringRef &CPU);
58 } // end namespace mips
59 } // end namespace target
60 } // end namespace driver
61 } // end namespace clang
63 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H