summaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenInstruction.h
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-07-14 21:47:18 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-07-14 21:47:18 +0000
commit5196c12e9fdec9ef3c63d96cb529c1c1cb732773 (patch)
tree78d2c0a828c34d649e022fc51e5af3a8ce29bd8d /utils/TableGen/CodeGenInstruction.h
parent70d8fcfaa04eb20541b006a8fb97cbc1d3033cc4 (diff)
downloadllvm-5196c12e9fdec9ef3c63d96cb529c1c1cb732773.tar.gz
llvm-5196c12e9fdec9ef3c63d96cb529c1c1cb732773.tar.bz2
llvm-5196c12e9fdec9ef3c63d96cb529c1c1cb732773.tar.xz
Add a new field to MCOperandInfo that contains information about the type of the Operand.
- The actual values are from the MCOI::OperandType enum. - Teach tblgen to read it from the instruction definition. - This is a better implementation of the hacks in edis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135197 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenInstruction.h')
-rw-r--r--utils/TableGen/CodeGenInstruction.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/utils/TableGen/CodeGenInstruction.h b/utils/TableGen/CodeGenInstruction.h
index e00b631247..8d7669aca9 100644
--- a/utils/TableGen/CodeGenInstruction.h
+++ b/utils/TableGen/CodeGenInstruction.h
@@ -78,6 +78,10 @@ namespace llvm {
/// for binary encoding. "getMachineOpValue" by default.
std::string EncoderMethodName;
+ /// OperandType - A value from MCOI::OperandType representing the type of
+ /// the operand.
+ std::string OperandType;
+
/// MIOperandNo - Currently (this is meant to be phased out), some logical
/// operands correspond to multiple MachineInstr operands. In the X86
/// target for example, one address operand is represented as 4
@@ -101,10 +105,11 @@ namespace llvm {
std::vector<ConstraintInfo> Constraints;
OperandInfo(Record *R, const std::string &N, const std::string &PMN,
- const std::string &EMN, unsigned MION, unsigned MINO,
- DagInit *MIOI)
+ const std::string &EMN, const std::string &OT, unsigned MION,
+ unsigned MINO, DagInit *MIOI)
: Rec(R), Name(N), PrinterMethodName(PMN), EncoderMethodName(EMN),
- MIOperandNo(MION), MINumOperands(MINO), MIOperandInfo(MIOI) {}
+ OperandType(OT), MIOperandNo(MION), MINumOperands(MINO),
+ MIOperandInfo(MIOI) {}
/// getTiedOperand - If this operand is tied to another one, return the