@@ -146,6 +146,34 @@ class CheckImmOperand_s<int Index, string Value> : CheckOperandBase<Index> {
146
146
string ImmVal = Value;
147
147
}
148
148
149
+ // Check that the operand at position `Index` is less than `Imm`.
150
+ // If field `FunctionMapper` is a non-empty string, then function
151
+ // `FunctionMapper` is applied to the operand value, and the return value is then
152
+ // compared against `Imm`.
153
+ class CheckImmOperandLT<int Index, int Imm> : CheckOperandBase<Index> {
154
+ int ImmVal = Imm;
155
+ }
156
+
157
+ // Check that the operand at position `Index` is greater than `Imm`.
158
+ // If field `FunctionMapper` is a non-empty string, then function
159
+ // `FunctionMapper` is applied to the operand value, and the return value is then
160
+ // compared against `Imm`.
161
+ class CheckImmOperandGT<int Index, int Imm> : CheckOperandBase<Index> {
162
+ int ImmVal = Imm;
163
+ }
164
+
165
+ // Check that the operand at position `Index` is less than or equal to `Imm`.
166
+ // If field `FunctionMapper` is a non-empty string, then function
167
+ // `FunctionMapper` is applied to the operand value, and the return value is then
168
+ // compared against `Imm`.
169
+ class CheckImmOperandLE<int Index, int Imm> : CheckNot<CheckImmOperandGT<Index, Imm>>;
170
+
171
+ // Check that the operand at position `Index` is greater than or equal to `Imm`.
172
+ // If field `FunctionMapper` is a non-empty string, then function
173
+ // `FunctionMapper` is applied to the operand value, and the return value is then
174
+ // compared against `Imm`.
175
+ class CheckImmOperandGE<int Index, int Imm> : CheckNot<CheckImmOperandLT<Index, Imm>>;
176
+
149
177
// Expands to a call to `FunctionMapper` if field `FunctionMapper` is set.
150
178
// Otherwise, it expands to a CheckNot<CheckInvalidRegOperand<Index>>.
151
179
class CheckRegOperandSimple<int Index> : CheckOperandBase<Index>;
@@ -197,6 +225,12 @@ class CheckAll<list<MCInstPredicate> Sequence>
197
225
class CheckAny<list<MCInstPredicate> Sequence>
198
226
: CheckPredicateSequence<Sequence>;
199
227
228
+ // Check that the operand at position `Index` is in range [Start, End].
229
+ // If field `FunctionMapper` is a non-empty string, then function
230
+ // `FunctionMapper` is applied to the operand value, and the return value is then
231
+ // compared against range [Start, End].
232
+ class CheckImmOperandRange<int Index, int Start, int End>
233
+ : CheckAll<[CheckImmOperandGE<Index, Start>, CheckImmOperandLE<Index, End>]>;
200
234
201
235
// Used to expand the body of a function predicate. See the definition of
202
236
// TIIPredicate below.
0 commit comments