summaryrefslogtreecommitdiff
path: root/test/MC/Hexagon/ro-cc9.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/Hexagon/ro-cc9.s')
-rw-r--r--test/MC/Hexagon/ro-cc9.s7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/MC/Hexagon/ro-cc9.s b/test/MC/Hexagon/ro-cc9.s
new file mode 100644
index 000000000000..0596ca1627f9
--- /dev/null
+++ b/test/MC/Hexagon/ro-cc9.s
@@ -0,0 +1,7 @@
+# RUN: not llvm-mc -arch=hexagon -filetype=asm %s 2> %t; FileCheck %s < %t
+#
+
+# Check that changes to a read-only register is caught.
+
+{ c9:8 = r1:0 }
+# CHECK: error: Cannot write to read-only register