mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
368eb5857e
The MIPS backend has inconsistent usage of instruction predicates for assembly and code generation. The issue arises from supporting three encodings, two (MIPS and microMIPS) of which have a near 1:1 instruction mapping across ISA revisions and a third encoding with a more restricted set of instructions (MIPS16e). To enforce consistent usage, each of the ISA_* adjectives has (or will have) the relevant encoding attached to it along the relevant ISA revision where the instruction is defined. Each instruction, pattern or alias will then have the correct ISA adjective attached to it, and the base instruction description classes will have any predicates relating to ISA encoding or revision removed. Pseudo instructions will also be guarded for the encoding or ABI that they are supported in. Finally, the hasStandardEncoding() / inMicroMipsMode() / inMips16Mode() methods of MipsSubtarget will be changed such that only one can be true at any one time. The result of this is that code generation and assembly will produce the correct encoding up front, while code generated from pseudo instructions and other inserted sequences of instructions will be able to rely on the mapping tables to produce the correct encoding. This should fix numerous bugs where the result 'happens' to be correct but has edge cases where microMIPS and MIPS have subtle differences (e.g. microMIPSR6 using 'j', 'jal' instructions.) This patch starts the process by changing most of the ISA adjectives to make use of the EncodingPredicate member of PredicateControl. Follow on patches will annotate instructions with their correct ISA adjective and eliminate the usage of "let Predicates = [..]", "let AdditionalPredicates = [..]" and "isCodeGenOnly = 1" in the cases where it was used to control instruction availability. Contributions from Nitesh Jain. Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D41434 llvm-svn: 326322 |
||
---|---|---|
.. | ||
AsmParser | ||
Disassembler | ||
InstPrinter | ||
MCTargetDesc | ||
TargetInfo | ||
CMakeLists.txt | ||
LLVMBuild.txt | ||
MicroMips32r6InstrFormats.td | ||
MicroMips32r6InstrInfo.td | ||
MicroMipsDSPInstrFormats.td | ||
MicroMipsDSPInstrInfo.td | ||
MicroMipsInstrFormats.td | ||
MicroMipsInstrFPU.td | ||
MicroMipsInstrInfo.td | ||
MicroMipsSizeReduction.cpp | ||
Mips16FrameLowering.cpp | ||
Mips16FrameLowering.h | ||
Mips16HardFloat.cpp | ||
Mips16HardFloatInfo.cpp | ||
Mips16HardFloatInfo.h | ||
Mips16InstrFormats.td | ||
Mips16InstrInfo.cpp | ||
Mips16InstrInfo.h | ||
Mips16InstrInfo.td | ||
Mips16ISelDAGToDAG.cpp | ||
Mips16ISelDAGToDAG.h | ||
Mips16ISelLowering.cpp | ||
Mips16ISelLowering.h | ||
Mips16RegisterInfo.cpp | ||
Mips16RegisterInfo.h | ||
Mips32r6InstrFormats.td | ||
Mips32r6InstrInfo.td | ||
Mips64InstrInfo.td | ||
Mips64r6InstrInfo.td | ||
Mips.h | ||
Mips.td | ||
MipsAnalyzeImmediate.cpp | ||
MipsAnalyzeImmediate.h | ||
MipsAsmPrinter.cpp | ||
MipsAsmPrinter.h | ||
MipsCallingConv.td | ||
MipsCallLowering.cpp | ||
MipsCallLowering.h | ||
MipsCCState.cpp | ||
MipsCCState.h | ||
MipsCondMov.td | ||
MipsConstantIslandPass.cpp | ||
MipsDelaySlotFiller.cpp | ||
MipsDSPInstrFormats.td | ||
MipsDSPInstrInfo.td | ||
MipsEVAInstrFormats.td | ||
MipsEVAInstrInfo.td | ||
MipsFastISel.cpp | ||
MipsFrameLowering.cpp | ||
MipsFrameLowering.h | ||
MipsHazardSchedule.cpp | ||
MipsInstrFormats.td | ||
MipsInstrFPU.td | ||
MipsInstrInfo.cpp | ||
MipsInstrInfo.h | ||
MipsInstrInfo.td | ||
MipsInstructionSelector.cpp | ||
MipsISelDAGToDAG.cpp | ||
MipsISelDAGToDAG.h | ||
MipsISelLowering.cpp | ||
MipsISelLowering.h | ||
MipsLegalizerInfo.cpp | ||
MipsLegalizerInfo.h | ||
MipsLongBranch.cpp | ||
MipsMachineFunction.cpp | ||
MipsMachineFunction.h | ||
MipsMCInstLower.cpp | ||
MipsMCInstLower.h | ||
MipsModuleISelDAGToDAG.cpp | ||
MipsMSAInstrFormats.td | ||
MipsMSAInstrInfo.td | ||
MipsMTInstrFormats.td | ||
MipsMTInstrInfo.td | ||
MipsOptimizePICCall.cpp | ||
MipsOptionRecord.h | ||
MipsOs16.cpp | ||
MipsRegisterBankInfo.cpp | ||
MipsRegisterBankInfo.h | ||
MipsRegisterInfo.cpp | ||
MipsRegisterInfo.h | ||
MipsRegisterInfo.td | ||
MipsSchedule.td | ||
MipsScheduleGeneric.td | ||
MipsScheduleP5600.td | ||
MipsSEFrameLowering.cpp | ||
MipsSEFrameLowering.h | ||
MipsSEInstrInfo.cpp | ||
MipsSEInstrInfo.h | ||
MipsSEISelDAGToDAG.cpp | ||
MipsSEISelDAGToDAG.h | ||
MipsSEISelLowering.cpp | ||
MipsSEISelLowering.h | ||
MipsSERegisterInfo.cpp | ||
MipsSERegisterInfo.h | ||
MipsSubtarget.cpp | ||
MipsSubtarget.h | ||
MipsTargetMachine.cpp | ||
MipsTargetMachine.h | ||
MipsTargetObjectFile.cpp | ||
MipsTargetObjectFile.h | ||
MipsTargetStreamer.h | ||
MSA.txt | ||
Relocation.txt |