aboutsummaryrefslogtreecommitdiff
path: root/backend/include/rcc
diff options
context:
space:
mode:
Diffstat (limited to 'backend/include/rcc')
-rw-r--r--backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h5
-rw-r--r--backend/include/rcc/TableGen/Record.h23
2 files changed, 28 insertions, 0 deletions
diff --git a/backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h b/backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h
index 807cb4a..7cceca3 100644
--- a/backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h
+++ b/backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h
@@ -27,8 +27,13 @@ enum class GIMatchTableOpcode : std::uint8_t {
CheckOperandType,
CheckOperandBank,
CheckOperandClass,
+ CheckIntegerPredicate,
+ CheckOperandDefConstant,
MutateOpcode,
+ RenderOperand,
+ RenderPhysicalRegister,
AppendImmediate,
+ EraseOperandDefinition,
Complete,
};
diff --git a/backend/include/rcc/TableGen/Record.h b/backend/include/rcc/TableGen/Record.h
index 94308c7..4378af8 100644
--- a/backend/include/rcc/TableGen/Record.h
+++ b/backend/include/rcc/TableGen/Record.h
@@ -229,16 +229,39 @@ struct SourceSelectionOperandClassPredicate final {
TextRange Range;
};
+struct SourceSelectionIntegerPredicate final {
+ std::uint32_t OperandIndex = 0;
+ std::string Predicate;
+ TextRange Range;
+};
+
+struct SourceSelectionOperandDefConstantPredicate final {
+ std::uint32_t OperandIndex = 0;
+ std::int64_t Value = 0;
+ TextRange Range;
+};
+
+struct SourceSelectionOperandRenderer final {
+ std::optional<std::uint32_t> OperandIndex;
+ std::string PhysicalRegisterSymbol;
+ std::vector<std::string> Flags;
+ TextRange Range;
+};
+
struct SourceSelectionRule final {
std::string Symbol;
std::uint32_t Priority = 0;
std::string MatchOpcodeSymbol;
std::optional<SourceSelectionTypePredicate> ResultType;
+ std::optional<SourceSelectionIntegerPredicate> IntegerPredicate;
std::vector<SourceSelectionOperandTypePredicate> OperandTypes;
std::vector<SourceSelectionOperandBankPredicate> OperandBanks;
std::vector<SourceSelectionOperandClassPredicate> OperandClasses;
+ std::vector<SourceSelectionOperandDefConstantPredicate> OperandDefConstants;
std::string ResultOpcodeSymbol;
+ std::optional<std::vector<SourceSelectionOperandRenderer>> OperandRenderers;
std::vector<std::int64_t> AppendedImmediates;
+ std::vector<std::uint32_t> EraseOperandDefinitions;
TextRange Range;
};