llvm-6502/lib/Target/Mips
Daniel Sanders e1820a6a4e [mips][fp64] Add an implicit def to MFHC1 claiming that it reads the lower 32-bits of 64-bit FPR
Summary:
This is a white lie to workaround a widespread bug in the -mfp64
implementation.

The problem is that none of the 32-bit fpu ops mention the fact that they
clobber the upper 32-bits of the 64-bit FPR. This allows MFHC1 to be
scheduled on the wrong side of most 32-bit FPU ops. Fixing that requires a
major overhaul of the FPU implementation which can't be done right now due to
time constraints.

MFHC1 is one of two affected instructions. These instructions are the only
FPU instructions that don't read or write the lower 32-bits. We therefore
pretend that it reads the bottom 32-bits to artificially create a dependency and
prevent the scheduler changing the behaviour of the code.
The other instruction is MTHC1 which will be fixed once I've have found a failing
test case for it. 

The testcase is test-suite/SingleSource/UnitTests/Vector/simple.c when
given TARGET_CFLAGS="-mips32r2 -mfp64 -mmsa".

Reviewers: jacksprat, matheusalmeida

Reviewed By: jacksprat

Differential Revision: http://llvm-reviews.chandlerc.com/D2966

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203464 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-10 15:01:57 +00:00
..
AsmParser [mips] Assembly parser must invoke the target streamer to handle .set reorder macro. 2014-03-10 13:21:10 +00:00
Disassembler Cleaning up a bunch of pre-Visual C++ 2012 build hacks. 2014-03-04 09:23:33 +00:00
InstPrinter [cleanup] Re-sort all the includes with utils/sort_includes.py. 2014-03-04 10:07:28 +00:00
MCTargetDesc This patch implements .set dsp directive and sets appropriate feature bits.This directive is a counterpart of -mattr=dsp command line option with the exception that it does not influence elf header flags. The usage example is gives in test file. 2014-03-05 11:05:09 +00:00
TargetInfo
CMakeLists.txt This patch has two main functions: 2014-02-14 19:16:39 +00:00
LLVMBuild.txt
Makefile
MicroMipsInstrFormats.td Fixed encoding of SYSCALL microMIPS instruction. 2014-02-28 18:17:08 +00:00
MicroMipsInstrFPU.td [mips][sched] Split IIFmoveC1 into II_M[FT]C1, II_M[FT]HC1, II_DM[FT]C1 2014-01-21 15:03:52 +00:00
MicroMipsInstrInfo.td Fixed operand of SC microMIPS instruction. 2014-02-28 18:22:56 +00:00
Mips16FrameLowering.cpp Replace PROLOG_LABEL with a new CFI_INSTRUCTION. 2014-03-07 06:08:31 +00:00
Mips16FrameLowering.h
Mips16HardFloat.cpp This patch has two main functions: 2014-02-14 19:16:39 +00:00
Mips16HardFloat.h
Mips16HardFloatInfo.cpp [cleanup] Re-sort all the includes with utils/sort_includes.py. 2014-03-04 10:07:28 +00:00
Mips16HardFloatInfo.h This patch has two main functions: 2014-02-14 19:16:39 +00:00
Mips16InstrFormats.td
Mips16InstrInfo.cpp [C++11] Replace llvm::next and llvm::prior with std::next and std::prev. 2014-03-02 12:27:27 +00:00
Mips16InstrInfo.h
Mips16InstrInfo.td [mips][sched] Split IIStore into II_S[BHWD], II_S[WD][LR], and II_SAVE 2014-01-23 10:31:31 +00:00
Mips16ISelDAGToDAG.cpp [Modules] Move CFG.h to the IR library as it defines graph traits over 2014-03-04 11:45:46 +00:00
Mips16ISelDAGToDAG.h
Mips16ISelLowering.cpp [cleanup] Re-sort all the includes with utils/sort_includes.py. 2014-03-04 10:07:28 +00:00
Mips16ISelLowering.h Add address space argument to allowsUnalignedMemoryAccess. 2014-02-05 23:15:53 +00:00
Mips16RegisterInfo.cpp [Layering] Move DebugInfo.h into the IR library where its implementation 2014-03-06 00:46:21 +00:00
Mips16RegisterInfo.h
Mips64InstrInfo.td [mips][sched] Split IIStore into II_S[BHWD], II_S[WD][LR], and II_SAVE 2014-01-23 10:31:31 +00:00
Mips.h
Mips.td [mips] Make it impossible to have UnknownABI in CodeGen and Integrated Assembler. 2014-02-20 14:58:19 +00:00
MipsAnalyzeImmediate.cpp
MipsAnalyzeImmediate.h
MipsAsmPrinter.cpp [mips] Implement NaCl sandboxing of indirect jumps: 2014-02-28 10:00:38 +00:00
MipsAsmPrinter.h Switch all uses of LLVM_OVERRIDE to just use 'override' directly. 2014-03-02 09:09:27 +00:00
MipsCallingConv.td [mips] Forbid the use of registers t6, t7 and t8 if the target is NaCl. 2014-02-07 17:16:40 +00:00
MipsCodeEmitter.cpp
MipsCondMov.td [mips][sched] Split IIFmove into II_C[FT]C1, II_MOV[FNTZ]_[SD], II_MOV_[SD] 2014-01-21 11:28:03 +00:00
MipsConstantIslandPass.cpp [Modules] Move InstIterator out of the Support library, where it had no 2014-03-04 10:30:26 +00:00
MipsDelaySlotFiller.cpp Replace PROLOG_LABEL with a new CFI_INSTRUCTION. 2014-03-07 06:08:31 +00:00
MipsDSPInstrFormats.td
MipsDSPInstrInfo.td
MipsFrameLowering.cpp
MipsFrameLowering.h
MipsInstrFormats.td
MipsInstrFPU.td [mips] Add NaCl target and forbid indexed loads and stores for it 2014-02-05 17:19:30 +00:00
MipsInstrInfo.cpp
MipsInstrInfo.h
MipsInstrInfo.td [mips] Prevent %lo relocation being used on MSA loads and stores. 2014-03-03 14:31:21 +00:00
MipsISelDAGToDAG.cpp [Modules] Move CFG.h to the IR library as it defines graph traits over 2014-03-04 11:45:46 +00:00
MipsISelDAGToDAG.h [mips] Prevent %lo relocation being used on MSA loads and stores. 2014-03-03 14:31:21 +00:00
MipsISelLowering.cpp [C++11] Replace llvm::next and llvm::prior with std::next and std::prev. 2014-03-02 12:27:27 +00:00
MipsISelLowering.h
MipsJITInfo.cpp
MipsJITInfo.h
MipsLongBranch.cpp [C++11] Replace llvm::next and llvm::prior with std::next and std::prev. 2014-03-02 12:27:27 +00:00
MipsMachineFunction.cpp
MipsMachineFunction.h [Modules] Move ValueMap to the IR library. While this class does not 2014-03-04 11:26:31 +00:00
MipsMCInstLower.cpp
MipsMCInstLower.h
MipsModuleISelDAGToDAG.cpp
MipsModuleISelDAGToDAG.h
MipsMSAInstrFormats.td [mips][msa] Add DLSA instruction. 2014-02-10 12:05:17 +00:00
MipsMSAInstrInfo.td [mips] Prevent %lo relocation being used on MSA loads and stores. 2014-03-03 14:31:21 +00:00
MipsOptimizePICCall.cpp
MipsOs16.cpp
MipsOs16.h
MipsRegisterInfo.cpp [Layering] Move DebugInfo.h into the IR library where its implementation 2014-03-06 00:46:21 +00:00
MipsRegisterInfo.h
MipsRegisterInfo.td
MipsRelocations.h
MipsSchedule.td [mips][sched] Split IIStore into II_S[BHWD], II_S[WD][LR], and II_SAVE 2014-01-23 10:31:31 +00:00
MipsSEFrameLowering.cpp Replace PROLOG_LABEL with a new CFI_INSTRUCTION. 2014-03-07 06:08:31 +00:00
MipsSEFrameLowering.h
MipsSEInstrInfo.cpp [mips][fp64] Add an implicit def to MFHC1 claiming that it reads the lower 32-bits of 64-bit FPR 2014-03-10 15:01:57 +00:00
MipsSEInstrInfo.h
MipsSEISelDAGToDAG.cpp [Modules] Move CFG.h to the IR library as it defines graph traits over 2014-03-04 11:45:46 +00:00
MipsSEISelDAGToDAG.h [mips] Prevent %lo relocation being used on MSA loads and stores. 2014-03-03 14:31:21 +00:00
MipsSEISelLowering.cpp [mips][msa] Correct the behaviour of the COPY_FW pseudo on lanes 2 and 3. 2014-03-04 13:54:30 +00:00
MipsSEISelLowering.h Switch all uses of LLVM_OVERRIDE to just use 'override' directly. 2014-03-02 09:09:27 +00:00
MipsSelectionDAGInfo.cpp
MipsSelectionDAGInfo.h
MipsSERegisterInfo.cpp [Layering] Move DebugInfo.h into the IR library where its implementation 2014-03-06 00:46:21 +00:00
MipsSERegisterInfo.h
MipsSubtarget.cpp [mips] Treat -mcpu=generic the same way as an empty CPU string. 2014-02-26 10:20:15 +00:00
MipsSubtarget.h [mips] Forbid the use of registers t6, t7 and t8 if the target is NaCl. 2014-02-07 17:16:40 +00:00
MipsTargetMachine.cpp
MipsTargetMachine.h
MipsTargetObjectFile.cpp Pass the Mangler by reference. 2014-02-08 14:53:28 +00:00
MipsTargetObjectFile.h Switch all uses of LLVM_OVERRIDE to just use 'override' directly. 2014-03-02 09:09:27 +00:00
MipsTargetStreamer.h This patch implements .set dsp directive and sets appropriate feature bits.This directive is a counterpart of -mattr=dsp command line option with the exception that it does not influence elf header flags. The usage example is gives in test file. 2014-03-05 11:05:09 +00:00
MSA.txt