1 //===--- Mips.h - Mips-specific Tool Helpers ----------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H
12 #include "clang/Driver/Driver.h"
13 #include "llvm/ADT/StringRef.h"
14 #include "llvm/ADT/Triple.h"
15 #include "llvm/Option/Option.h"
24 typedef enum { Legacy = 1, Std2008 = 2 } IEEE754Standard;
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,
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 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);
56 } // end namespace mips
57 } // end namespace target
58 } // end namespace driver
59 } // end namespace clang
61 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H