diff options
Diffstat (limited to 'backend/utils/TableGen/InstrInfoEmitter.cpp')
| -rw-r--r-- | backend/utils/TableGen/InstrInfoEmitter.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/backend/utils/TableGen/InstrInfoEmitter.cpp b/backend/utils/TableGen/InstrInfoEmitter.cpp index b06134f..1f42d4a 100644 --- a/backend/utils/TableGen/InstrInfoEmitter.cpp +++ b/backend/utils/TableGen/InstrInfoEmitter.cpp @@ -49,7 +49,16 @@ void emitOperandDescriptor(std::ostream &Output, const NormalizedOperand &Operan else Output << "std::nullopt"; Output << ", .TargetOperandType = std::nullopt, .AllowedTargetFlags = " - << Operand.AllowedTargetFlags << ", .TypeConstraint = std::nullopt},\n"; + << Operand.AllowedTargetFlags << ", .TypeConstraint = "; + if (Operand.TypeIndex) { + Output << "OperandTypeConstraint{LowLevelTypeKindSet{" + << "LowLevelType::Kind::CategoryNeutralScalar, LowLevelType::Kind::Pointer, " + << "LowLevelType::Kind::Vector, LowLevelType::Kind::VectorPointer}, std::uint16_t{" + << *Operand.TypeIndex << "}}"; + } else { + Output << "std::nullopt"; + } + Output << "},\n"; } void emitImplicitRegisterList(std::ostream &Output, const NormalizedTargetModel &Model, |
