binutils/SOURCES/binutils-AArch64-missing-assembler-tests-10.patch

84 lines
2.1 KiB
Diff

From f495cce64504db4b66a23479022c887fa04a1242 Mon Sep 17 00:00:00 2001
From: Alice Carlotti <alice.carlotti@arm.com>
Date: Sun, 20 Apr 2025 23:12:00 +0100
Subject: [PATCH] aarch64: Add new test exception-generation.d
svc and dcps* were already tested, but are included here as part of the
same encoding group.
---
.../gas/aarch64/exception-generation.d | 28 +++++++++++++++++++
.../gas/aarch64/exception-generation.s | 26 +++++++++++++++++
2 files changed, 54 insertions(+)
create mode 100644 gas/testsuite/gas/aarch64/exception-generation.d
create mode 100644 gas/testsuite/gas/aarch64/exception-generation.s
diff --git a/gas/testsuite/gas/aarch64/exception-generation.d b/gas/testsuite/gas/aarch64/exception-generation.d
new file mode 100644
index 00000000000..e35cccd5831
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/exception-generation.d
@@ -0,0 +1,28 @@
+#as: -march=armv8-a
+#objdump: -dr
+
+.*: file format .*
+
+
+Disassembly of section \.text:
+
+0+ <\.text>:
+ *[0-9a-f]+: d4000001 svc #0x0
+ *[0-9a-f]+: d41fffe1 svc #0xffff
+ *[0-9a-f]+: d4000002 hvc #0x0
+ *[0-9a-f]+: d41fffe2 hvc #0xffff
+ *[0-9a-f]+: d4000003 smc #0x0
+ *[0-9a-f]+: d41fffe3 smc #0xffff
+ *[0-9a-f]+: d4200000 brk #0x0
+ *[0-9a-f]+: d43fffe0 brk #0xffff
+ *[0-9a-f]+: d4400000 hlt #0x0
+ *[0-9a-f]+: d45fffe0 hlt #0xffff
+ *[0-9a-f]+: d4a00001 dcps1
+ *[0-9a-f]+: d4a00001 dcps1
+ *[0-9a-f]+: d4bfffe1 dcps1 #0xffff
+ *[0-9a-f]+: d4a00002 dcps2
+ *[0-9a-f]+: d4a00002 dcps2
+ *[0-9a-f]+: d4bfffe2 dcps2 #0xffff
+ *[0-9a-f]+: d4a00003 dcps3
+ *[0-9a-f]+: d4a00003 dcps3
+ *[0-9a-f]+: d4bfffe3 dcps3 #0xffff
diff --git a/gas/testsuite/gas/aarch64/exception-generation.s b/gas/testsuite/gas/aarch64/exception-generation.s
new file mode 100644
index 00000000000..56294fe57cd
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/exception-generation.s
@@ -0,0 +1,26 @@
+ svc #0
+ svc #65535
+
+ hvc #0
+ hvc #65535
+
+ smc #0
+ smc #65535
+
+ brk #0
+ brk #65535
+
+ hlt #0
+ hlt #65535
+
+ dcps1
+ dcps1 #0
+ dcps1 #65535
+
+ dcps2
+ dcps2 #0
+ dcps2 #65535
+
+ dcps3
+ dcps3 #0
+ dcps3 #65535
--
2.50.1