OSDN Git Service

TableGen: Allow custom register operand decoder method
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 18 Jul 2016 23:20:46 +0000 (23:20 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 18 Jul 2016 23:20:46 +0000 (23:20 +0000)
commit2d37e256fe18a1ca2ac435f872fe113bd2b3a8c5
tree3381bae50aa48a6741381d1f2d0f6c794d3eafd3
parentf36ea238a4c189ab178da96f74c9854d4651657a
TableGen: Allow custom register operand decoder method

This is for a situation where the encoding for a register may be
different depending on the specific operand. For some instructions,
we want to apply additional restrictions beyond the encoding's
constraints.

In AMDGPU some operands are VSrc_32, using the VS_32 pseudo register
class which accept VGPRs, SGPRs, or immediates in the encoding.
Some specific instructions with the same encoding operand do not want
to allow immediates or SGPRs, but the encoding format is different
in this case than a regular VGPR_32 operand.

This allows specifying the encoding should be treated the same
without introducing yet another dummy register class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275929 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/Target.td
utils/TableGen/FixedLenDecoderEmitter.cpp