OSDN Git Service

[AMDGPU] Assembler: Fix VOP3 only instructions
authorTom Stellard <thomas.stellard@amd.com>
Thu, 11 Feb 2016 03:28:15 +0000 (03:28 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Thu, 11 Feb 2016 03:28:15 +0000 (03:28 +0000)
commit4ea8ee7c76bb187fb8d0a0f873ed1f222dcd1d31
tree2d128c94b27c0a5d8bbd5a0e6e570ec2748ef6da
parente48f9ae77d645883da4e12d30e4e834c541c0353
[AMDGPU] Assembler: Fix VOP3 only instructions

Separate methods to convert parsed instructions to MCInst:

  - VOP3 only instructions (always create modifiers as operands in MCInst)
  - VOP2 instrunctions with modifiers (create modifiers as operands
    in MCInst when e64 encoding is forced or modifiers are parsed)
  - VOP2 instructions without modifiers (do not create modifiers
    as operands in MCInst)
  - Add VOP3Only flag. Pass HasMods flag to VOP3Common.
  - Simplify code that deals with modifiers (-1 is now same as
    0). This is no longer needed.
  - Add few tests (more will be added separately).
    Update error message now correct.

Patch By: Nikolay Haustov

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260483 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
lib/Target/AMDGPU/SIInstrFormats.td
lib/Target/AMDGPU/SIInstrInfo.td
lib/Target/AMDGPU/SIInstructions.td
test/MC/AMDGPU/vop3.s