]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
aarch64: Add new test exception-generation.d
authorAlice Carlotti <alice.carlotti@arm.com>
Sun, 20 Apr 2025 22:12:00 +0000 (23:12 +0100)
committerAlice Carlotti <alice.carlotti@arm.com>
Fri, 9 May 2025 19:27:21 +0000 (20:27 +0100)
svc and dcps* were already tested, but are included here as part of the
same encoding group.

gas/testsuite/gas/aarch64/exception-generation.d [new file with mode: 0644]
gas/testsuite/gas/aarch64/exception-generation.s [new file with mode: 0644]

diff --git a/gas/testsuite/gas/aarch64/exception-generation.d b/gas/testsuite/gas/aarch64/exception-generation.d
new file mode 100644 (file)
index 0000000..e35cccd
--- /dev/null
@@ -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 (file)
index 0000000..56294fe
--- /dev/null
@@ -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