[llvm] [ARM64EC] Warn on using disallowed registers in assembly src. (PR #93618)

Daniel Paoliello via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 09:22:50 PDT 2024


================
@@ -0,0 +1,75 @@
+// RUN: llvm-mc -triple arm64ec-pc-windows-msvc < %s 2> %t.log
+// RUN: FileCheck %s --check-prefix=CHECK-ERR < %t.log
+
+
+// ---- disallowed x registers ----
+orr x13, x0, x1             // x13
+// CHECK-ERR: warning: this instruction uses disallowed registers.
+orr x14, x2, x3             // x14
+// CHECK-ERR: warning: this instruction uses disallowed registers.
+orr x4, x23, x5             // x23
+// CHECK-ERR: warning: this instruction uses disallowed registers.
+orr x6, x7, x24             // x24
+// CHECK-ERR: warning: this instruction uses disallowed registers.
+orr x28, x8, x9             // x28
+// CHECK-ERR: warning: this instruction uses disallowed registers.
----------------
dpaoliello wrote:

+1 to building this as `aarch64-windows-msvc` and validating there are no warnings.
As for making sure that we can build other assembly as Arm64EC, I wouldn't add a dedicated test case, but instead add Arm64EC as a run in some other tests for AArch64 that already exist.

https://github.com/llvm/llvm-project/pull/93618


More information about the llvm-commits mailing list