llvm-project/llvm/test/MC
Tom Stellard e1818af8c5 [AMDGPU] Disassembler: Added basic disassembler for AMDGPU target
Changes:

- Added disassembler project
- Fixed all decoding conflicts in .td files
- Added DecoderMethod=“NONE” option to Target.td that allows to
  disable decoder generation for an instruction.
- Created decoding functions for VS_32 and VReg_32 register classes.
- Added stubs for decoding all register classes.
- Added several tests for disassembler

Disassembler only supports:

- VI subtarget
- VOP1 instruction encoding
- 32-bit register operands and inline constants

[Valery]

One of the point that requires to pay attention to is how decoder
conflicts were resolved:

- Groups of target instructions were separated by using different
  DecoderNamespace (SICI, VI, CI) using similar to AssemblerPredicate
  approach.

- There were conflicts in IMAGE_<> instructions caused by two
  different reasons:

1. dmask wasn’t specified for the output (fixed)
2. There are image instructions that differ only by the number of
   the address components but have the same encoding by the HW spec. The
   actual number of address components is determined by the HW at runtime
   using image resource descriptor starting from the VGPR encoded in an
   IMAGE instruction. This means that we should choose only one instruction
   from conflicting group to be the rule for decoder. I didn’t find the way
   to disable decoder generation for an arbitrary instruction and therefore
   made a onelinear fix to tablegen generator that would suppress decoder
   generation when DecoderMethod is set to “NONE”. This is a change that
   should be reviewed and submitted first. Otherwise I would need to
   specify different DecoderNamespace for every instruction in the
   conflicting group. I haven’t checked yet if DecoderMethod=“NONE” is not
   used in other targets.
3. IMAGE_GATHER decoder generation is for now disabled and to be
   done later.

[/Valery]

Patch By: Sam Kolton

Differential Revision: http://reviews.llvm.org/D16723

llvm-svn: 261185
2016-02-18 03:42:32 +00:00
..
AArch64 Followup to 258750; update all MC tests to use .p2align . 2016-01-26 00:27:59 +00:00
AMDGPU [AMDGPU] Assembler: Swap operands of flat_store instructions to match AMD assembler 2016-02-12 17:57:54 +00:00
ARM Followup to 258750; update all MC tests to use .p2align . 2016-01-26 00:27:59 +00:00
AsmParser [MC] Fixed parsing of macro arguments where expressions with spaces are present. 2016-02-11 13:48:49 +00:00
COFF [codeview] Dump def range lengths in hex 2016-02-11 23:40:14 +00:00
Disassembler [AMDGPU] Disassembler: Added basic disassembler for AMDGPU target 2016-02-18 03:42:32 +00:00
ELF Accept subtractions involving a weak symbol. 2016-01-20 18:57:48 +00:00
Hexagon [Hexagon] Adding relocation for code size, cold path optimization allowing a 23-bit 4-byte aligned relocation to be a valid instruction encoding. 2016-02-16 20:38:17 +00:00
MachO Form reform for MCDwarf. 2015-12-23 01:57:31 +00:00
Markup
Mips [mips] Removed the SHF_ALLOC flag and the SHT_REL flag from the .pdr section. 2016-02-17 11:15:16 +00:00
PowerPC [MC] Merge VK_PPC_TPREL in to generic VK_TPREL. 2016-02-10 18:32:01 +00:00
Sparc [SPARC] Repair floating-point condition encodings in assembly parser. 2016-02-10 17:47:20 +00:00
SystemZ [SystemZ] Sort relocs to avoid code corruption by linker optimization 2015-12-16 18:12:40 +00:00
X86 [X86] Change FeatureIFMA string to 'avx512ifma'. Matches gcc and fixes PR26461. 2016-02-08 01:23:15 +00:00