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 { NanLegacy = 1, Nan2008 = 2 } NanEncoding;
35 NanEncoding getSupportedNanEncoding(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);
57 } // end namespace mips
58 } // end namespace target
59 } // end namespace driver
60 } // end namespace clang
62 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H