llvm-6502/test/MC/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
..
mips1 [mips] Added a full set of instruction test cases for all ISA's (but not ASE's). 2014-03-31 12:13:12 +00:00
mips2 [mips] Added a full set of instruction test cases for all ISA's (but not ASE's). 2014-03-31 12:13:12 +00:00
mips3 [mips] Rewrite MipsAsmParser and MipsOperand. 2014-03-31 17:43:46 +00:00
mips4 [mips] Rewrite MipsAsmParser and MipsOperand. 2014-03-31 17:43:46 +00:00
mips5 [mips] Rewrite MipsAsmParser and MipsOperand. 2014-03-31 17:43:46 +00:00
mips32 [mips] Added a full set of instruction test cases for all ISA's (but not ASE's). 2014-03-31 12:13:12 +00:00
mips32r2 [mips] Rewrite MipsAsmParser and MipsOperand. 2014-03-31 17:43:46 +00:00
mips64 [mips] Rewrite MipsAsmParser and MipsOperand. 2014-03-31 17:43:46 +00:00
mips64r2 [mips] Rewrite MipsAsmParser and MipsOperand. 2014-03-31 17:43:46 +00:00
msa [mips][msa] Add DLSA instruction. 2014-02-10 12:05:17 +00:00
cfi.s [mips] Rewrite MipsAsmParser and MipsOperand. 2014-03-31 17:43:46 +00:00
cpsetup.s [mips] Add support for .cpsetup 2014-03-27 13:52:53 +00:00
do_switch1.s Convert "llc -filetype=obj" test into llvm-mc tests. 2014-03-28 18:30:07 +00:00
do_switch2.s Convert "llc -filetype=obj" test into llvm-mc tests. 2014-03-28 18:30:07 +00:00
do_switch3.s Parse .gpdword and convert another llc -filetype=obj test. 2014-03-28 18:50:26 +00:00
eh-frame.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
elf_basic.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
elf_eflags_abicalls.s Implement the missing bits corresponding to .mips_hack_elf_flags. 2014-01-26 06:57:13 +00:00
elf_eflags_micromips.s Implement the missing bits corresponding to .mips_hack_elf_flags. 2014-01-26 06:57:13 +00:00
elf_eflags_mips16.s Implement the missing bits corresponding to .mips_hack_elf_flags. 2014-01-26 06:57:13 +00:00
elf_eflags_noreorder.s Implement the missing bits corresponding to .mips_hack_elf_flags. 2014-01-26 06:57:13 +00:00
elf_eflags_pic0.s Implement the missing bits corresponding to .mips_hack_elf_flags. 2014-01-26 06:57:13 +00:00
elf_eflags_pic2.s [mips] Add support for '.option pic2'. 2014-03-26 13:40:29 +00:00
elf_eflags.s [mips] Make it impossible to have UnknownABI in CodeGen and Integrated Assembler. 2014-02-20 14:58:19 +00:00
elf_reginfo.s [mips] Make it impossible to have UnknownABI in CodeGen and Integrated Assembler. 2014-02-20 14:58:19 +00:00
elf_st_other.s Only mark functions as micromips. 2014-01-15 03:07:12 +00:00
elf-bigendian.ll Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
elf-gprel-32-64.s Parse .gpdword and convert another llc -filetype=obj test. 2014-03-28 18:50:26 +00:00
elf-N64.s convert another llc -filetype=obj test. 2014-03-28 18:34:31 +00:00
elf-objdump.s
elf-relsym.s Map ELf flags back to more specific section kinds. 2014-03-28 19:14:08 +00:00
elf-tls.s Convert another llc -filetype=obj test. 2014-03-28 19:19:28 +00:00
expr1.s Mips assembler: Enable handling of nested expressions 2013-04-17 00:18:04 +00:00
higher_highest.ll Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
hilo-addressing.s Changed comment. 2014-02-07 11:16:02 +00:00
lit.local.cfg [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
micromips-16-bit-instructions.s Implementation of microMIPS 16-bit instructions MOVE and JALR. 2014-03-20 10:18:24 +00:00
micromips-alias.s Mark alias symbols as microMIPS if necessary. Differential Revision: http://llvm-reviews.chandlerc.com/D3080 2014-03-20 09:44:49 +00:00
micromips-alu-instructions.s Implementation of microMIPS 16-bit instructions MOVE and JALR. 2014-03-20 10:18:24 +00:00
micromips-bad-branches.s [mips] Add checks for alignment and maximum displacements for most of the 2013-12-13 11:11:02 +00:00
micromips-branch16.s Support for microMIPS branch instructions. 2013-11-04 14:53:22 +00:00
micromips-branch-instructions.s Support for microMIPS branch instructions. 2013-11-04 14:53:22 +00:00
micromips-control-instructions.s Provide an operand for microMIPS wait instruction. 2014-03-20 10:41:37 +00:00
micromips-diagnostic-fixup.s [mips] Add checks for alignment and maximum displacements for most of the 2013-12-13 11:11:02 +00:00
micromips-expansions.s Added tests for microMIPS relocations 1. 2013-10-24 10:55:00 +00:00
micromips-expressions.s Added tests for microMIPS relocations 1. 2013-10-24 10:55:00 +00:00
micromips-fpu-instructions.s Support for microMIPS FPU instructions 2. 2013-12-25 10:09:27 +00:00
micromips-jump26.s Support for microMIPS jump instructions 2013-10-29 16:38:59 +00:00
micromips-jump-instructions.s Implementation of microMIPS 16-bit instructions MOVE and JALR. 2014-03-20 10:18:24 +00:00
micromips-loadstore-instructions.s Added support for LWU microMIPS instruction. 2014-01-15 13:01:18 +00:00
micromips-loadstore-unaligned.s [Mips] Support for unaligned load/store microMips instructions 2013-08-13 20:19:16 +00:00
micromips-movcond-instructions.s This patch adds support for microMIPS Move Conditional instructions. Test cases are included in patch. 2013-09-06 12:41:17 +00:00
micromips-multiply-instructions.s This patch adds support for microMIPS Multiply and Add/Sub instructions. Test cases are included in patch. 2013-09-06 13:08:00 +00:00
micromips-pc16-fixup.s [mips] Fix off by one issue when applying a fixup. 2013-12-17 17:10:00 +00:00
micromips-relocations.s Support for microMIPS TLS relocations. 2013-12-19 16:02:32 +00:00
micromips-shift-instructions.s Mips ELF: MicroMips direct object Little endian support. 2013-08-08 23:30:40 +00:00
micromips-tailr.s Support for microMIPS jump instructions 2013-10-29 16:38:59 +00:00
micromips-trap-instructions.s Use instr mapping for microMIPS in llvm-mc. 2013-11-15 08:07:34 +00:00
mips64-alu-instructions.s [mips] Use TwoOperandAliasConstraint for ArithLogicR instructions. 2014-03-26 16:09:43 +00:00
mips64-instructions.s [mips] Use ptr_rc to simplify definitions of base+index load/store instructions. 2013-08-28 00:55:15 +00:00
mips64-register-names-n32-n64.s [mips] Add tests for t0-t3 for N32/N64 2014-03-26 11:46:34 +00:00
mips64-register-names-o32.s [mips] The register names depend on the ABI being N32/N64 rather than the arch being mips64 2014-03-26 11:39:07 +00:00
mips64eb-fixups.s [mips] support FK_Data_2 and FK_Data_8 to fix big-endian debug data 2014-03-03 14:27:49 +00:00
mips64extins.ll
mips64shift.ll
mips_directives_bad.s [mips] Add support for '.option pic2'. 2014-03-26 13:40:29 +00:00
mips_directives.s [mips] Add support to '.set mips64'. 2014-03-26 15:14:32 +00:00
mips_gprel16.s Convert llc -filetype=obj test. 2014-03-28 19:38:20 +00:00
mips-alu-instructions.s [mips] Use TwoOperandAliasConstraint for ArithLogicR instructions. 2014-03-26 16:09:43 +00:00
mips-bad-branches.s [mips] Add checks for alignment and maximum displacements for most of the 2013-12-13 11:11:02 +00:00
mips-control-instructions.s This patch implements trap instructions for mips. The test cases are added. 2013-08-26 10:02:40 +00:00
mips-coprocessor-encodings.s
mips-data-directives.s [mips] Add support to the '.dword' directive. 2014-03-26 15:44:18 +00:00
mips-diagnostic-fixup.s [mips] Add checks for alignment and maximum displacements for most of the 2013-12-13 11:11:02 +00:00
mips-dsp-instructions.s [mips] Set HI/LO registers' HWEncoding field. 2013-10-15 01:00:00 +00:00
mips-expansions.s Use object file specific section type for initial text section 2013-04-14 21:18:36 +00:00
mips-fpu-instructions.s This patch fixes a bug in floating point operands parsing, when instruction alias uses default register operand. 2013-11-13 09:48:53 +00:00
mips-jump-instructions.s This patch implements jalx instruction for Mips architecture.This instruction executes a procedure call within the current 256 MB-aligned region and change the ISA Mode from MIPS32 to microMIPS32 or MIPS16e. Usage samples for assembler and dissasembler are provided as well. 2014-03-03 13:12:59 +00:00
mips-memory-instructions.s Use object file specific section type for initial text section 2013-04-14 21:18:36 +00:00
mips-noat.s [mips] '.set at=$0' should be equivalent to '.set noat' 2014-03-25 13:01:06 +00:00
mips-pc16-fixup.s [mips] Fix off by one issue when applying a fixup. 2013-12-17 17:10:00 +00:00
mips-register-names-invalid.s [mips] Rewrite MipsAsmParser and MipsOperand. 2014-03-31 17:43:46 +00:00
mips-register-names-o32.s [mips] The register names depend on the ABI being N32/N64 rather than the arch being mips64 2014-03-26 11:39:07 +00:00
mips-relocations.s Use object file specific section type for initial text section 2013-04-14 21:18:36 +00:00
multi-64bit-func.ll
nabi-regs.s [mips] Make it impossible to have UnknownABI in CodeGen and Integrated Assembler. 2014-02-20 14:58:19 +00:00
nacl-mask.s [mips] Implement NaCl sandboxing of function calls: 2014-03-11 21:23:40 +00:00
octeon-instructions.s [mips] Use TwoOperandAliasConstraint for ArithLogicR instructions. 2014-03-26 16:09:43 +00:00
pr11877.s
r-mips-got-disp.s Convert llc -filetype=obj test. 2014-03-28 19:41:33 +00:00
set-at-directive-explicit-at.s [mips] Rewrite MipsAsmParser and MipsOperand. 2014-03-31 17:43:46 +00:00
set-at-directive.s [mips] Correct testcase for .set at=$reg and emit the new warnings for numeric registers too. 2014-03-25 11:16:03 +00:00
sext_64_32.ll
sym-offset.ll Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
xgot.s [mips] Implement missing relocations in the integrated assembler. 2014-03-31 15:15:02 +00:00