Files
acceptance-tests
data
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
bdwgc
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm-project
clang
clang-tools-extra
compiler-rt
eng
libcxx
libcxxabi
libunwind
lld
lldb
llvm
bindings
cmake
docs
examples
include
lib
Analysis
AsmParser
BinaryFormat
Bitcode
CodeGen
DebugInfo
Demangle
ExecutionEngine
FuzzMutate
Fuzzer
IR
IRReader
LTO
LineEditor
Linker
MC
Object
ObjectYAML
Option
Passes
ProfileData
Support
TableGen
Target
AArch64
AMDGPU
ARC
ARM
AVR
BPF
Hexagon
Lanai
MSP430
Mips
NVPTX
Nios2
InstPrinter
MCTargetDesc
TargetInfo
CMakeLists.txt
LLVMBuild.txt
Nios2.h
Nios2.td
Nios2AsmPrinter.cpp
Nios2CallingConv.td
Nios2FrameLowering.cpp
Nios2FrameLowering.h
Nios2ISelDAGToDAG.cpp
Nios2ISelLowering.cpp
Nios2ISelLowering.h
Nios2InstrFormats.td
Nios2InstrInfo.cpp
Nios2InstrInfo.h
Nios2InstrInfo.td
Nios2MCInstLower.cpp
Nios2MachineFunction.cpp
Nios2MachineFunction.h
Nios2RegisterInfo.cpp
Nios2RegisterInfo.h
Nios2RegisterInfo.td
Nios2Schedule.td
Nios2Subtarget.cpp
Nios2Subtarget.h
Nios2TargetMachine.cpp
Nios2TargetMachine.h
Nios2TargetObjectFile.cpp
Nios2TargetObjectFile.h
Nios2TargetStreamer.h
PowerPC
RISCV
Sparc
SystemZ
WebAssembly
X86
XCore
CMakeLists.txt
LLVMBuild.txt
README.txt
Target.cpp
TargetIntrinsicInfo.cpp
TargetLoweringObjectFile.cpp
TargetMachine.cpp
TargetMachineC.cpp
Testing
ToolDrivers
Transforms
WindowsManifest
XRay
CMakeLists.txt
LLVMBuild.txt
projects
resources
runtimes
scripts
test
tools
unittests
utils
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in
version.txt.in
nuget
openmp
polly
Directory.Build.props
Directory.Build.targets
NuGet.config
azure-pipelines.yml
build.cmd
build.sh
dir.common.props
global.json
llvm.proj
mxe-Win64.cmake.in
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
llvm
m4
man
mcs
mono
msvc
netcore
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
linux-packaging-mono/external/llvm-project/llvm/lib/Target/Nios2/Nios2Subtarget.h

98 lines
2.8 KiB
C
Raw Normal View History

//===-- Nios2Subtarget.h - Define Subtarget for the Nios2 -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file declares the Nios2 specific subclass of TargetSubtargetInfo.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIB_TARGET_NIOS2_NIOS2SUBTARGET_H
#define LLVM_LIB_TARGET_NIOS2_NIOS2SUBTARGET_H
#include "Nios2FrameLowering.h"
#include "Nios2ISelLowering.h"
#include "Nios2InstrInfo.h"
#include "llvm/CodeGen/SelectionDAGTargetInfo.h"
#include "llvm/CodeGen/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#define GET_SUBTARGETINFO_HEADER
#include "Nios2GenSubtargetInfo.inc"
namespace llvm {
class StringRef;
class Nios2TargetMachine;
class Nios2Subtarget : public Nios2GenSubtargetInfo {
virtual void anchor();
public:
// Nios2 R2 features
// Bit manipulation instructions extension
bool HasBMX;
// Code Density instructions extension
bool HasCDX;
// Multi-Processor instructions extension
bool HasMPX;
// New mandatory instructions
bool HasR2Mandatory;
protected:
enum Nios2ArchEnum {
// Nios2 R1 ISA
Nios2r1,
// Nios2 R2 ISA
Nios2r2
};
// Nios2 architecture version
Nios2ArchEnum Nios2ArchVersion;
Triple TargetTriple;
Nios2InstrInfo InstrInfo;
Nios2TargetLowering TLInfo;
SelectionDAGTargetInfo TSInfo;
Nios2FrameLowering FrameLowering;
public:
/// This constructor initializes the data members to match that
/// of the specified triple.
Nios2Subtarget(const Triple &TT, const std::string &CPU,
const std::string &FS, const TargetMachine &TM);
/// ParseSubtargetFeatures - Parses features string setting specified
/// subtarget options. Definition of function is auto generated by tblgen.
void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
bool hasNios2r1() const { return Nios2ArchVersion >= Nios2r1; }
bool isNios2r1() const { return Nios2ArchVersion == Nios2r1; }
bool hasNios2r2() const { return Nios2ArchVersion >= Nios2r2; }
bool isNios2r2() const { return Nios2ArchVersion == Nios2r2; }
Nios2Subtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
const Nios2InstrInfo *getInstrInfo() const override { return &InstrInfo; }
const TargetFrameLowering *getFrameLowering() const override {
return &FrameLowering;
}
const Nios2RegisterInfo *getRegisterInfo() const override {
return &InstrInfo.getRegisterInfo();
}
const Nios2TargetLowering *getTargetLowering() const override {
return &TLInfo;
}
const SelectionDAGTargetInfo *getSelectionDAGInfo() const override {
return &TSInfo;
}
};
} // namespace llvm
#endif