llvm-6502/lib/Target/Mips
Daniel Sanders 8f7dc89e21 [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@205229 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-31 17:43:46 +00:00
..
AsmParser [mips] Rewrite MipsAsmParser and MipsOperand. 2014-03-31 17:43:46 +00:00
Disassembler [mips] Rewrite MipsAsmParser and MipsOperand. 2014-03-31 17:43:46 +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 Completely rewrite ELFObjectWriter::RecordRelocation. 2014-03-29 06:26:49 +00:00
TargetInfo
CMakeLists.txt This patch has two main functions: 2014-02-14 19:16:39 +00:00
LLVMBuild.txt
Makefile
MicroMipsInstrFormats.td Provide an operand for microMIPS wait instruction. 2014-03-20 10:41:37 +00:00
MicroMipsInstrFPU.td
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
Mips16InstrInfo.td
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
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.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
MipsCodeEmitter.cpp remove a bunch of unused private methods 2014-03-23 17:09:26 +00:00
MipsCondMov.td
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
MipsInstrInfo.cpp
MipsInstrInfo.h
MipsInstrInfo.td [mips] Rewrite MipsAsmParser and MipsOperand. 2014-03-31 17:43:46 +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-03-31 17:43:46 +00:00
MipsISelLowering.h [mips] Rewrite MipsAsmParser and MipsOperand. 2014-03-31 17:43:46 +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
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-03-31 17:43:46 +00:00
MipsOptimizePICCall.cpp
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-03-31 17:43:46 +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-03-31 17:43:46 +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
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