llvm-6502/lib/Target/Mips
Daniel Sanders bd48d31b37 [mips] Rewrite MipsAsmParser and MipsOperand.
Summary:
Highlights:
- Registers are resolved much later (by the render method).
  Prior to that point, GPR32's/GPR64's are GPR's regardless of register
  size. Similarly FGR32's/FGR64's/AFGR64's are FGR's regardless of register
  size or FR mode. Numeric registers can be anything.
- All registers are parsed the same way everywhere (even when handling
  symbol aliasing)
  - One consequence is that all registers can be specified numerically
    almost anywhere (e.g. $fccX, $wX). The exception is symbol aliasing
    but that can be easily resolved.
- Removes the need for the hasConsumedDollar hack
- Parenthesis and Bracket suffixes are handled generically
- Micromips instructions are parsed directly instead of going through the
  standard encodings first.
- rdhwr accepts all 32 registers, and the following instructions that previously
  xfailed now work:
    ddiv, ddivu, div, divu, cvt.l.[ds], se[bh], wsbh, floor.w.[ds], c.ngl.d,
    c.sf.s, dsbh, dshd, madd.s, msub.s, nmadd.s, nmsub.s, swxc1
- Diagnostics involving registers point at the correct character (the $)
- There's only one kind of immediate in MipsOperand. LSA immediates are handled
  by the predicate and renderer.

Lowlights:
- Hardcoded '$zero' in the div patterns is handled with a hack.
  MipsOperand::isReg() will return true for a k_RegisterIndex token
  with Index == 0 and getReg() will return ZERO for this case. Note that it
  doesn't return ZERO_64 on isGP64() targets.
- I haven't cleaned up all of the now-unused functions.
  Some more of the generic parser could be removed too (integers and relocs
  for example).
- insve.df needed a custom decoder to handle the implicit fourth operand that
  was needed to make it parse correctly. The difficulty was that the matcher
  expected a Token<'0'> but gets an Imm<0>. Adding an implicit zero solved this.

Reviewers: matheusalmeida, vmedic

Reviewed By: matheusalmeida

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205292 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-01 10:35:28 +00:00
..
AsmParser [mips] Rewrite MipsAsmParser and MipsOperand. 2014-04-01 10:35:28 +00:00
Disassembler [mips] Rewrite MipsAsmParser and MipsOperand. 2014-04-01 10:35:28 +00:00
InstPrinter Revert r205194 - [mips] Removed R_MIPS_GOT. It's identical to R_MIPS_GOT16. 2014-03-31 14:34:36 +00:00
MCTargetDesc Don't relocate with sections if there might be a paired relocation. 2014-03-31 19:00:23 +00:00
TargetInfo Prune redundant dependencies in LLVMBuild.txt. 2013-12-11 00:30:57 +00:00
CMakeLists.txt This patch has two main functions: 2014-02-14 19:16:39 +00:00
LLVMBuild.txt Add proper dependencies to LLVMBuild.txt in llvm/lib. 2013-12-10 05:39:34 +00:00
Makefile
MicroMipsInstrFormats.td Provide an operand for microMIPS wait instruction. 2014-03-20 10:41:37 +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 issue with microMIPS JAL instruction. 2014-03-31 14:00:10 +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 Delete dead code. 2013-12-06 00:13:50 +00:00
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 Replace '#include ValueTypes.h' with forward declarations. 2014-03-12 08:00:24 +00:00
Mips16RegisterInfo.h
Mips64InstrInfo.td [mips] Use TwoOperandAliasConstraint for ArithLogicR instructions. 2014-03-26 16:09:43 +00:00
Mips.h [mips] Revert test commit r195922. 2013-11-28 15:26:33 +00:00
Mips.td [MIPS] Add cpu octeon and some instructions 2014-03-20 11:51:58 +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 remove a bunch of unused private methods 2014-03-23 17:09:26 +00:00
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 remove a bunch of unused private methods 2014-03-23 17:09:26 +00:00
MipsDelaySlotFiller.cpp [mips] Implement NaCl sandboxing of loads, stores and SP changes: 2014-03-10 20:34:23 +00:00
MipsDSPInstrFormats.td
MipsDSPInstrInfo.td
MipsFrameLowering.cpp
MipsFrameLowering.h
MipsInstrFormats.td [MIPS] Add cpu octeon and some instructions 2014-03-20 11:51:58 +00:00
MipsInstrFPU.td [mips] Add NaCl target and forbid indexed loads and stores for it 2014-02-05 17:19:30 +00:00
MipsInstrInfo.cpp [weak vtables] Remove a bunch of weak vtables 2013-11-19 00:57:56 +00:00
MipsInstrInfo.h [weak vtables] Remove a bunch of weak vtables 2013-11-19 00:57:56 +00:00
MipsInstrInfo.td [mips] Rewrite MipsAsmParser and MipsOperand. 2014-04-01 10:35:28 +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 [mips] Rewrite MipsAsmParser and MipsOperand. 2014-04-01 10:35:28 +00:00
MipsISelLowering.h [mips] Rewrite MipsAsmParser and MipsOperand. 2014-04-01 10:35:28 +00:00
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 Move the llvm mangler to lib/IR. 2014-01-07 21:19:40 +00:00
MipsMCInstLower.h
MipsModuleISelDAGToDAG.cpp
MipsModuleISelDAGToDAG.h
MipsMSAInstrFormats.td [mips][msa] Add DLSA instruction. 2014-02-10 12:05:17 +00:00
MipsMSAInstrInfo.td [mips] Rewrite MipsAsmParser and MipsOperand. 2014-04-01 10:35:28 +00:00
MipsOptimizePICCall.cpp Re-sort all of the includes with ./utils/sort_includes.py so that 2014-01-07 11:48:04 +00:00
MipsOs16.cpp
MipsOs16.h
MipsRegisterInfo.cpp Replace '#include ValueTypes.h' with forward declarations. 2014-03-12 08:00:24 +00:00
MipsRegisterInfo.h
MipsRegisterInfo.td [mips] Rewrite MipsAsmParser and MipsOperand. 2014-04-01 10:35:28 +00:00
MipsRelocations.h
MipsSchedule.td [mips] Implement shorthand add / sub forms for MIPS. 2014-03-24 14:05:39 +00:00
MipsSEFrameLowering.cpp Replace PROLOG_LABEL with a new CFI_INSTRUCTION. 2014-03-07 06:08:31 +00:00
MipsSEFrameLowering.h
MipsSEInstrInfo.cpp Implementation of microMIPS 16-bit instructions MOVE and JALR. 2014-03-20 10:18:24 +00:00
MipsSEInstrInfo.h
MipsSEISelDAGToDAG.cpp [mips] Some uses of isMips64()/hasMips64() are really tests for 64-bit GPR's 2014-03-27 16:42:17 +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] Rewrite MipsAsmParser and MipsOperand. 2014-04-01 10:35:28 +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 Replace '#include ValueTypes.h' with forward declarations. 2014-03-12 08:00:24 +00:00
MipsSERegisterInfo.h
MipsSubtarget.cpp [mips] Some uses of isMips64()/hasMips64() are really tests for 64-bit GPR's 2014-03-27 16:42:17 +00:00
MipsSubtarget.h [MIPS] Add cpu octeon and some instructions 2014-03-20 11:51:58 +00:00
MipsTargetMachine.cpp Fix regression with -O0 for mips . 2014-03-10 16:31:25 +00:00
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 [mips] Add support to '.set mips64'. 2014-03-26 15:14:32 +00:00
MSA.txt [mips] BSEL's and BINS[RL] operands are reversed compared to the vselect node used in the pattern. 2014-03-12 11:54:00 +00:00