@@ -146,6 +146,34 @@ class CheckImmOperand_s<int Index, string Value> : CheckOperandBase<Index> {
146146 string ImmVal = Value;
147147}
148148
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+
149177// Expands to a call to `FunctionMapper` if field `FunctionMapper` is set.
150178// Otherwise, it expands to a CheckNot<CheckInvalidRegOperand<Index>>.
151179class CheckRegOperandSimple<int Index> : CheckOperandBase<Index>;
@@ -197,6 +225,12 @@ class CheckAll<list<MCInstPredicate> Sequence>
197225class CheckAny<list<MCInstPredicate> Sequence>
198226 : CheckPredicateSequence<Sequence>;
199227
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>]>;
200234
201235// Used to expand the body of a function predicate. See the definition of
202236// TIIPredicate below.
0 commit comments