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)
commit89b26108b12bf608601049e3b6285192fda2ea47
treebde95d989791ae47c0b00048e960082822bf5fb1
parent5f1d9eaad35ee3fa9f474e58d90a9708711c5726
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.

llvm-svn: 225661
llvm/include/llvm/MC/MCInstrDesc.h
llvm/include/llvm/Target/Target.td
llvm/utils/TableGen/CodeGenInstruction.cpp
llvm/utils/TableGen/InstrInfoEmitter.cpp