================
@@ -6073,6 +6074,33 @@ bool AArch64AsmParser::validateInstruction(MCInst &Inst, 
SMLoc &IDLoc,
                            " registers are the same");
     break;
   }
+  case AArch64::SETGOP:
+  case AArch64::SETGOPT:
+  case AArch64::SETGOPN:
+  case AArch64::SETGOPTN:
+  case AArch64::SETGOM:
+  case AArch64::SETGOMT:
+  case AArch64::SETGOMN:
+  case AArch64::SETGOMTN:
+  case AArch64::SETGOE:
+  case AArch64::SETGOET:
+  case AArch64::SETGOEN:
+  case AArch64::SETGOETN: {
+    MCRegister Xd_wb = Inst.getOperand(0).getReg();
+    MCRegister Xn_wb = Inst.getOperand(1).getReg();
+    MCRegister Xd = Inst.getOperand(2).getReg();
+    MCRegister Xn = Inst.getOperand(3).getReg();
+    if (Xd_wb != Xd)
+      return Error(Loc[0],
+                   "invalid SET instruction, Xd_wb and Xd do not match");
+    if (Xn_wb != Xn)
+      return Error(Loc[0],
+                   "invalid SET instruction, Xn_wb and Xn do not match");
----------------
jthackray wrote:

I could change to:
```
   [[maybe_unused]]  MCRegister Xd_wb = Inst.getOperand(0).getReg();
   [[maybe_unused]]  MCRegister Xn_wb = Inst.getOperand(1).getReg();

   assert(Xd_wb == Xd && "Xd_wb and Xd do not match");
   assert(Xn_wb == Xn && "Xn_wb and Xn do not match");
```
(need the `[[maybe_unused]]` to avoid `warning: unused variable 'Xd_wb'` from 
the compiler)

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

Reply via email to