Target: Allow target specific operand types
authorTom Stellard <thomas.stellard@amd.com>
Mon, 12 Jan 2015 19:33:09 +0000 (19:33 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 12 Jan 2015 19:33:09 +0000 (19:33 +0000)
commitb461e8304c1d1cc933e447d43fa77472bef3fe84
treef94d86d1d831639ff3144afb294160ecc6bc41fa
parent2211d38267b5140d262cd61ceb7ac7fd1d826a13
Target: Allow target specific operand types

This adds two new fields to the RegisterOperand TableGen class:

string OperandNamespace = "MCOI";
string OperandType = "OPERAND_REGISTER";

These fields can be used to specify a target specific operand type,
which will be stored in the OperandType member of the MCOperandInfo
object.

This can be useful for targets that need to store some extra information
about operands that cannot be expressed using the target independent
types.  For example, in the R600 backend, there are operands which
can take either registers or immediates and it is convenient to be able
to specify this in the TableGen definitions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225661 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCInstrDesc.h
include/llvm/Target/Target.td
utils/TableGen/CodeGenInstruction.cpp
utils/TableGen/InstrInfoEmitter.cpp