summaryrefslogtreecommitdiff
path: root/include/llvm/MC
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 /include/llvm/MC
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 'include/llvm/MC')
-rw-r--r--include/llvm/MC/MCInstrDesc.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/MC/MCInstrDesc.h b/include/llvm/MC/MCInstrDesc.h
index c7a7235b05..49969143cd 100644
--- a/include/llvm/MC/MCInstrDesc.h
+++ b/include/llvm/MC/MCInstrDesc.h
@@ -38,6 +38,15 @@ namespace MCOI {
Predicate,
OptionalDef
};
+
+ /// Operand Type - Operands are tagged with one of the values of this enum.
+ enum OperandType {
+ OPERAND_UNKNOWN,
+ OPERAND_IMMEDIATE,
+ OPERAND_REGISTER,
+ OPERAND_MEMORY,
+ OPERAND_PCREL
+ };
}
/// MCOperandInfo - This holds information about one operand of a machine
@@ -57,6 +66,9 @@ public:
/// Lower 16 bits are used to specify which constraints are set. The higher 16
/// bits are used to specify the value of constraints (4 bits each).
unsigned Constraints;
+
+ /// OperandType - Information about the type of the operand.
+ MCOI::OperandType OperandType;
/// Currently no other information.
/// isLookupPtrRegClass - Set if this operand is a pointer value and it