llvm-6502/test/MC
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
..
AArch64 PR18929: 2014-03-30 17:09:54 +00:00
ARM Recommitted fix for PR18931, with extended tests set. 2014-03-29 13:12:40 +00:00
ARM64 ARM64: initial backend import 2014-03-29 10:18:08 +00:00
AsmParser Move tests that require ARM to an ARM test directory. 2014-03-18 22:43:59 +00:00
COFF Object/COFF: change data type of SymbolNumber from int16 to uint16. 2014-03-15 00:04:08 +00:00
Disassembler ARM64: initial backend import 2014-03-29 10:18:08 +00:00
ELF DebugInfo: Avoid creating unnecessary/empty line tables and remove the special case of '0' in DwarfCompileUnit::initStmtList by just always using a label difference 2014-04-01 08:07:52 +00:00
MachO ARM64: initial backend import 2014-03-29 10:18:08 +00:00
Markup MC: Simple example parser for MC assembly markup. 2012-10-31 23:24:13 +00:00
Mips [mips] Rewrite MipsAsmParser and MipsOperand. 2014-04-01 10:35:28 +00:00
PowerPC [PowerPC] Generate little-endian object files 2014-03-24 18:16:09 +00:00
Sparc [Sparc] Add trap on integer condition codes (Ticc) instructions to Sparc backend. 2014-03-02 23:39:07 +00:00
SystemZ [SystemZ] Add support for z196 float<->unsigned conversions 2014-03-21 10:56:30 +00:00
X86 AVX-512: Implemented masking for integer arithmetic & logic instructions. 2014-03-27 09:45:08 +00:00