Files
acceptance-tests
data
debian
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
AsmParser
Disassembler
InstPrinter
MCTargetDesc
TargetInfo
CMakeLists.txt
LLVMBuild.txt
MSA.txt
MicroMips32r6InstrFormats.td
MicroMips32r6InstrInfo.td
MicroMipsDSPInstrFormats.td
MicroMipsDSPInstrInfo.td
MicroMipsInstrFPU.td
MicroMipsInstrFormats.td
MicroMipsInstrInfo.td
MicroMipsSizeReduction.cpp
Mips.h
Mips.td
Mips16FrameLowering.cpp
Mips16FrameLowering.h
Mips16HardFloat.cpp
Mips16HardFloatInfo.cpp
Mips16HardFloatInfo.h
Mips16ISelDAGToDAG.cpp
Mips16ISelDAGToDAG.h
Mips16ISelLowering.cpp
Mips16ISelLowering.h
Mips16InstrFormats.td
Mips16InstrInfo.cpp
Mips16InstrInfo.h
Mips16InstrInfo.td
Mips16RegisterInfo.cpp
Mips16RegisterInfo.h
Mips32r6InstrFormats.td
Mips32r6InstrInfo.td
Mips64InstrInfo.td
Mips64r6InstrInfo.td
MipsAnalyzeImmediate.cpp
MipsAnalyzeImmediate.h
MipsAsmPrinter.cpp
MipsAsmPrinter.h
MipsCCState.cpp
MipsCCState.h
MipsCallingConv.td
MipsCondMov.td
MipsConstantIslandPass.cpp
MipsDSPInstrFormats.td
MipsDSPInstrInfo.td
MipsDelaySlotFiller.cpp
MipsEVAInstrFormats.td
MipsEVAInstrInfo.td
MipsFastISel.cpp
MipsFrameLowering.cpp
MipsFrameLowering.h
MipsHazardSchedule.cpp
MipsISelDAGToDAG.cpp
MipsISelDAGToDAG.h
MipsISelLowering.cpp.REMOVED.git-id
MipsISelLowering.h
MipsInstrFPU.td
MipsInstrFormats.td
MipsInstrInfo.cpp
MipsInstrInfo.h
MipsInstrInfo.td.REMOVED.git-id
MipsLongBranch.cpp
MipsMCInstLower.cpp
MipsMCInstLower.h
MipsMSAInstrFormats.td
MipsMSAInstrInfo.td.REMOVED.git-id
MipsMTInstrFormats.td
MipsMTInstrInfo.td
MipsMachineFunction.cpp
MipsMachineFunction.h
MipsModuleISelDAGToDAG.cpp
MipsOptimizePICCall.cpp
MipsOptionRecord.h
MipsOs16.cpp
MipsRegisterInfo.cpp
MipsRegisterInfo.h
MipsRegisterInfo.td
MipsSEFrameLowering.cpp
MipsSEFrameLowering.h
MipsSEISelDAGToDAG.cpp
MipsSEISelDAGToDAG.h
MipsSEISelLowering.cpp.REMOVED.git-id
MipsSEISelLowering.h
MipsSEInstrInfo.cpp
MipsSEInstrInfo.h
MipsSERegisterInfo.cpp
MipsSERegisterInfo.h
MipsSchedule.td
MipsScheduleGeneric.td
MipsScheduleP5600.td
MipsSubtarget.cpp
MipsSubtarget.h
MipsTargetMachine.cpp
MipsTargetMachine.h
MipsTargetObjectFile.cpp
MipsTargetObjectFile.h
MipsTargetStreamer.h
Relocation.txt
NVPTX
Nios2
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/Mips/MipsDSPInstrFormats.td

370 lines
7.4 KiB
TableGen
Raw Normal View History

//===- MipsDSPInstrFormats.td - Mips Instruction Formats ---*- tablegen -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
class DspMMRel;
def Dsp2MicroMips : InstrMapping {
let FilterClass = "DspMMRel";
// Instructions with the same BaseOpcode and isNVStore values form a row.
let RowFields = ["BaseOpcode"];
// Instructions with the same predicate sense form a column.
let ColFields = ["Arch"];
// The key column is the unpredicated instructions.
let KeyCol = ["dsp"];
// Value columns are PredSense=true and PredSense=false
let ValueCols = [["dsp"], ["mmdsp"]];
}
def HasDSP : Predicate<"Subtarget->hasDSP()">,
AssemblerPredicate<"FeatureDSP">;
def HasDSPR2 : Predicate<"Subtarget->hasDSPR2()">,
AssemblerPredicate<"FeatureDSPR2">;
def HasDSPR3 : Predicate<"Subtarget->hasDSPR3()">,
AssemblerPredicate<"FeatureDSPR3">;
class ISA_DSPR2 {
list<Predicate> InsnPredicates = [HasDSPR2];
}
class ISA_DSPR3 {
list<Predicate> InsnPredicates = [HasDSPR3];
}
// Fields.
class Field6<bits<6> val> {
bits<6> V = val;
}
def SPECIAL3_OPCODE : Field6<0b011111>;
def REGIMM_OPCODE : Field6<0b000001>;
class DSPInst<string opstr = "">
: MipsInst<(outs), (ins), "", [], NoItinerary, FrmOther>, PredicateControl {
let InsnPredicates = [HasDSP];
string BaseOpcode = opstr;
string Arch = "dsp";
}
class PseudoDSP<dag outs, dag ins, list<dag> pattern,
InstrItinClass itin = IIPseudo>
: MipsPseudo<outs, ins, pattern, itin> {
let InsnPredicates = [HasDSP];
}
class DSPInstAlias<string Asm, dag Result, bit Emit = 0b1>
: InstAlias<Asm, Result, Emit>, PredicateControl {
let InsnPredicates = [HasDSP];
}
// ADDU.QB sub-class format.
class ADDU_QB_FMT<bits<5> op> : DSPInst {
bits<5> rd;
bits<5> rs;
bits<5> rt;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = rs;
let Inst{20-16} = rt;
let Inst{15-11} = rd;
let Inst{10-6} = op;
let Inst{5-0} = 0b010000;
}
class RADDU_W_QB_FMT<bits<5> op> : DSPInst {
bits<5> rd;
bits<5> rs;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = rs;
let Inst{20-16} = 0;
let Inst{15-11} = rd;
let Inst{10-6} = op;
let Inst{5-0} = 0b010000;
}
// CMPU.EQ.QB sub-class format.
class CMP_EQ_QB_R2_FMT<bits<5> op> : DSPInst {
bits<5> rs;
bits<5> rt;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = rs;
let Inst{20-16} = rt;
let Inst{15-11} = 0;
let Inst{10-6} = op;
let Inst{5-0} = 0b010001;
}
class CMP_EQ_QB_R3_FMT<bits<5> op> : DSPInst {
bits<5> rs;
bits<5> rt;
bits<5> rd;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = rs;
let Inst{20-16} = rt;
let Inst{15-11} = rd;
let Inst{10-6} = op;
let Inst{5-0} = 0b010001;
}
class PRECR_SRA_PH_W_FMT<bits<5> op> : DSPInst {
bits<5> rs;
bits<5> rt;
bits<5> sa;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = rs;
let Inst{20-16} = rt;
let Inst{15-11} = sa;
let Inst{10-6} = op;
let Inst{5-0} = 0b010001;
}
// ABSQ_S.PH sub-class format.
class ABSQ_S_PH_R2_FMT<bits<5> op> : DSPInst {
bits<5> rd;
bits<5> rt;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = 0;
let Inst{20-16} = rt;
let Inst{15-11} = rd;
let Inst{10-6} = op;
let Inst{5-0} = 0b010010;
}
class REPL_FMT<bits<5> op> : DSPInst {
bits<5> rd;
bits<10> imm;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-16} = imm;
let Inst{15-11} = rd;
let Inst{10-6} = op;
let Inst{5-0} = 0b010010;
}
// SHLL.QB sub-class format.
class SHLL_QB_FMT<bits<5> op> : DSPInst {
bits<5> rd;
bits<5> rt;
bits<5> rs_sa;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = rs_sa;
let Inst{20-16} = rt;
let Inst{15-11} = rd;
let Inst{10-6} = op;
let Inst{5-0} = 0b010011;
}
// LX sub-class format.
class LX_FMT<bits<5> op> : DSPInst {
bits<5> rd;
bits<5> base;
bits<5> index;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = base;
let Inst{20-16} = index;
let Inst{15-11} = rd;
let Inst{10-6} = op;
let Inst{5-0} = 0b001010;
}
// ADDUH.QB sub-class format.
class ADDUH_QB_FMT<bits<5> op> : DSPInst {
bits<5> rd;
bits<5> rs;
bits<5> rt;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = rs;
let Inst{20-16} = rt;
let Inst{15-11} = rd;
let Inst{10-6} = op;
let Inst{5-0} = 0b011000;
}
// APPEND sub-class format.
class APPEND_FMT<bits<5> op> : DSPInst {
bits<5> rt;
bits<5> rs;
bits<5> sa;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = rs;
let Inst{20-16} = rt;
let Inst{15-11} = sa;
let Inst{10-6} = op;
let Inst{5-0} = 0b110001;
}
// DPA.W.PH sub-class format.
class DPA_W_PH_FMT<bits<5> op> : DSPInst {
bits<2> ac;
bits<5> rs;
bits<5> rt;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = rs;
let Inst{20-16} = rt;
let Inst{15-13} = 0;
let Inst{12-11} = ac;
let Inst{10-6} = op;
let Inst{5-0} = 0b110000;
}
// MULT sub-class format.
class MULT_FMT<bits<6> opcode, bits<6> funct> : DSPInst {
bits<2> ac;
bits<5> rs;
bits<5> rt;
let Opcode = opcode;
let Inst{25-21} = rs;
let Inst{20-16} = rt;
let Inst{15-13} = 0;
let Inst{12-11} = ac;
let Inst{10-6} = 0;
let Inst{5-0} = funct;
}
// MFHI sub-class format.
class MFHI_FMT<bits<6> funct> : DSPInst {
bits<5> rd;
bits<2> ac;
let Inst{31-26} = 0;
let Inst{25-23} = 0;
let Inst{22-21} = ac;
let Inst{20-16} = 0;
let Inst{15-11} = rd;
let Inst{10-6} = 0;
let Inst{5-0} = funct;
}
// MTHI sub-class format.
class MTHI_FMT<bits<6> funct> : DSPInst {
bits<5> rs;
bits<2> ac;
let Inst{31-26} = 0;
let Inst{25-21} = rs;
let Inst{20-13} = 0;
let Inst{12-11} = ac;
let Inst{10-6} = 0;
let Inst{5-0} = funct;
}
// EXTR.W sub-class format (type 1).
class EXTR_W_TY1_FMT<bits<5> op> : DSPInst {
bits<5> rt;
bits<2> ac;
bits<5> shift_rs;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = shift_rs;
let Inst{20-16} = rt;
let Inst{15-13} = 0;
let Inst{12-11} = ac;
let Inst{10-6} = op;
let Inst{5-0} = 0b111000;
}
// SHILO sub-class format.
class SHILO_R1_FMT<bits<5> op> : DSPInst {
bits<2> ac;
bits<6> shift;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-20} = shift;
let Inst{19-13} = 0;
let Inst{12-11} = ac;
let Inst{10-6} = op;
let Inst{5-0} = 0b111000;
}
class SHILO_R2_FMT<bits<5> op> : DSPInst {
bits<2> ac;
bits<5> rs;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = rs;
let Inst{20-13} = 0;
let Inst{12-11} = ac;
let Inst{10-6} = op;
let Inst{5-0} = 0b111000;
}
class RDDSP_FMT<bits<5> op> : DSPInst {
bits<5> rd;
bits<10> mask;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-16} = mask;
let Inst{15-11} = rd;
let Inst{10-6} = op;
let Inst{5-0} = 0b111000;
}
class WRDSP_FMT<bits<5> op> : DSPInst {
bits<5> rs;
bits<10> mask;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = rs;
let Inst{20-11} = mask;
let Inst{10-6} = op;
let Inst{5-0} = 0b111000;
}
class BPOSGE32_FMT<bits<5> op> : DSPInst {
bits<16> offset;
let Opcode = REGIMM_OPCODE.V;
let Inst{25-21} = 0;
let Inst{20-16} = op;
let Inst{15-0} = offset;
}
// INSV sub-class format.
class INSV_FMT<bits<6> op> : DSPInst {
bits<5> rt;
bits<5> rs;
let Opcode = SPECIAL3_OPCODE.V;
let Inst{25-21} = rs;
let Inst{20-16} = rt;
let Inst{15-6} = 0;
let Inst{5-0} = op;
}