[llvm] [ARM64EC] Warn on using disallowed registers in assembly src. (PR #93618)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 01:16:21 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.
----------------
mstorsjo wrote:
Thanks, now as the warning message includes the name of the forbidden register, it's much less of a blind sequence (where testing quality depends on the number of warnings exactly matching the number of instructions) - now this is less of a concern to me.
https://github.com/llvm/llvm-project/pull/93618
More information about the llvm-commits
mailing list