================
@@ -2096,6 +2096,30 @@ def sys_cr_op : Operand<i32> {
   let OperandType = "OPERAND_IMMEDIATE";
 }
 
+// SYSP operands are more restricted than generic system CR/imm fields.
+def sysp_op1 : Operand<i64>, ImmLeaf<i64, [{
+  return Imm >= 0 && Imm <= 6;
+}]> {
+  let ParserMatchClass = Imm0_7Operand;
+  let OperandType = "OPERAND_IMMEDIATE";
+}
+
+def sysp_crn_op : Operand<i32>, ImmLeaf<i32, [{
+  return Imm == 8 || Imm == 9;
+}]> {
+  let PrintMethod = "printSysCROperand";
+  let ParserMatchClass = SysCRAsmOperand;
----------------
jthackray wrote:

Ok. I've added a templated `isSysCRinRange()` method, and then defined new 
classes in the tablegen, where we pass <low, high> to them. I've also updated 
the sysp diagnostic tests. Leaving this as unresolved, since there might be 
more to do here.

https://github.com/llvm/llvm-project/pull/182410
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to