clang 22.0.0git
Mips.h
Go to the documentation of this file.
1//===--- Mips.h - Mips-specific Tool Helpers --------------------*- C++ -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H
10#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_MIPS_H
11
12#include "clang/Driver/Driver.h"
13#include "llvm/ADT/StringRef.h"
14#include "llvm/Option/Option.h"
15#include "llvm/TargetParser/Triple.h"
16#include <string>
17#include <vector>
18
19namespace clang {
20namespace driver {
21namespace tools {
22
23namespace mips {
24typedef enum { Legacy = 1, Std2008 = 2 } IEEE754Standard;
25
26enum class FloatABI {
30};
31
33bool hasCompactBranches(StringRef &CPU);
34void getMipsCPUAndABI(const llvm::opt::ArgList &Args,
35 const llvm::Triple &Triple, StringRef &CPUName,
36 StringRef &ABIName);
37void getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple,
38 const llvm::opt::ArgList &Args,
39 std::vector<StringRef> &Features);
40StringRef getGnuCompatibleMipsABIName(StringRef ABI);
41mips::FloatABI getMipsFloatABI(const Driver &D, const llvm::opt::ArgList &Args,
42 const llvm::Triple &Triple);
43std::string getMipsABILibSuffix(const llvm::opt::ArgList &Args,
44 const llvm::Triple &Triple);
45bool hasMipsAbiArg(const llvm::opt::ArgList &Args, const char *Value);
46bool isUCLibc(const llvm::opt::ArgList &Args);
47bool isNaN2008(const Driver &D, const llvm::opt::ArgList &Args,
48 const llvm::Triple &Triple);
49bool isFPXXDefault(const llvm::Triple &Triple, StringRef CPUName,
50 StringRef ABIName, mips::FloatABI FloatABI);
51bool shouldUseFPXX(const llvm::opt::ArgList &Args, const llvm::Triple &Triple,
52 StringRef CPUName, StringRef ABIName,
54bool 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
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition Driver.h:99
void getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args, std::vector< StringRef > &Features)
StringRef getGnuCompatibleMipsABIName(StringRef ABI)
Definition Mips.cpp:138
bool isNaN2008(const Driver &D, const llvm::opt::ArgList &Args, const llvm::Triple &Triple)
bool hasMipsAbiArg(const llvm::opt::ArgList &Args, const char *Value)
mips::FloatABI getMipsFloatABI(const Driver &D, const llvm::opt::ArgList &Args, const llvm::Triple &Triple)
std::string getMipsABILibSuffix(const llvm::opt::ArgList &Args, const llvm::Triple &Triple)
bool shouldUseFPXX(const llvm::opt::ArgList &Args, const llvm::Triple &Triple, StringRef CPUName, StringRef ABIName, mips::FloatABI FloatABI)
bool hasCompactBranches(StringRef &CPU)
Definition Mips.cpp:440
bool isUCLibc(const llvm::opt::ArgList &Args)
void getMipsCPUAndABI(const llvm::opt::ArgList &Args, const llvm::Triple &Triple, StringRef &CPUName, StringRef &ABIName)
bool isFPXXDefault(const llvm::Triple &Triple, StringRef CPUName, StringRef ABIName, mips::FloatABI FloatABI)
Definition Mips.cpp:472
IEEE754Standard getIEEE754Standard(StringRef &CPU)
Definition Mips.cpp:416
bool supportsIndirectJumpHazardBarrier(StringRef &CPU)
Definition Mips.cpp:510
The JSON file list parser is used to communicate input to InstallAPI.