[PATCH 28/43] aarch64: Add new test ldst-unpriv.d

Alice Carlotti alice.carlotti@arm.com
Mon Apr 21 21:24:52 GMT 2025


All instructions were previously untested.


diff --git a/gas/testsuite/gas/aarch64/ldst-unpriv.d b/gas/testsuite/gas/aarch64/ldst-unpriv.d
new file mode 100644
index 0000000000000000000000000000000000000000..9c33678b28f5925dcff687524e974ead0ab7a974
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/ldst-unpriv.d
@@ -0,0 +1,61 @@
+#as: -march=armv8-a
+#objdump: -dr
+
+.*:     file format .*
+
+
+Disassembly of section \.text:
+
+0+ <\.text>:
+ *[0-9a-f]+:	38000800 	sttrb	w0, \[x0\]
+ *[0-9a-f]+:	3800081f 	sttrb	wzr, \[x0\]
+ *[0-9a-f]+:	38000be0 	sttrb	w0, \[sp\]
+ *[0-9a-f]+:	381ff800 	sttrb	w0, \[x0, #-1\]
+ *[0-9a-f]+:	38400800 	ldtrb	w0, \[x0\]
+ *[0-9a-f]+:	3840081f 	ldtrb	wzr, \[x0\]
+ *[0-9a-f]+:	38400be0 	ldtrb	w0, \[sp\]
+ *[0-9a-f]+:	385ff800 	ldtrb	w0, \[x0, #-1\]
+ *[0-9a-f]+:	38800800 	ldtrsb	x0, \[x0\]
+ *[0-9a-f]+:	3880081f 	ldtrsb	xzr, \[x0\]
+ *[0-9a-f]+:	38800be0 	ldtrsb	x0, \[sp\]
+ *[0-9a-f]+:	389ff800 	ldtrsb	x0, \[x0, #-1\]
+ *[0-9a-f]+:	38c00800 	ldtrsb	w0, \[x0\]
+ *[0-9a-f]+:	38c0081f 	ldtrsb	wzr, \[x0\]
+ *[0-9a-f]+:	38c00be0 	ldtrsb	w0, \[sp\]
+ *[0-9a-f]+:	38dff800 	ldtrsb	w0, \[x0, #-1\]
+ *[0-9a-f]+:	78000800 	sttrh	w0, \[x0\]
+ *[0-9a-f]+:	7800081f 	sttrh	wzr, \[x0\]
+ *[0-9a-f]+:	78000be0 	sttrh	w0, \[sp\]
+ *[0-9a-f]+:	781ff800 	sttrh	w0, \[x0, #-1\]
+ *[0-9a-f]+:	78400800 	ldtrh	w0, \[x0\]
+ *[0-9a-f]+:	7840081f 	ldtrh	wzr, \[x0\]
+ *[0-9a-f]+:	78400be0 	ldtrh	w0, \[sp\]
+ *[0-9a-f]+:	785ff800 	ldtrh	w0, \[x0, #-1\]
+ *[0-9a-f]+:	78800800 	ldtrsh	x0, \[x0\]
+ *[0-9a-f]+:	7880081f 	ldtrsh	xzr, \[x0\]
+ *[0-9a-f]+:	78800be0 	ldtrsh	x0, \[sp\]
+ *[0-9a-f]+:	789ff800 	ldtrsh	x0, \[x0, #-1\]
+ *[0-9a-f]+:	78c00800 	ldtrsh	w0, \[x0\]
+ *[0-9a-f]+:	78c0081f 	ldtrsh	wzr, \[x0\]
+ *[0-9a-f]+:	78c00be0 	ldtrsh	w0, \[sp\]
+ *[0-9a-f]+:	78dff800 	ldtrsh	w0, \[x0, #-1\]
+ *[0-9a-f]+:	b8000800 	sttr	w0, \[x0\]
+ *[0-9a-f]+:	b800081f 	sttr	wzr, \[x0\]
+ *[0-9a-f]+:	b8000be0 	sttr	w0, \[sp\]
+ *[0-9a-f]+:	b81ff800 	sttr	w0, \[x0, #-1\]
+ *[0-9a-f]+:	b8400800 	ldtr	w0, \[x0\]
+ *[0-9a-f]+:	b840081f 	ldtr	wzr, \[x0\]
+ *[0-9a-f]+:	b8400be0 	ldtr	w0, \[sp\]
+ *[0-9a-f]+:	b85ff800 	ldtr	w0, \[x0, #-1\]
+ *[0-9a-f]+:	b8800800 	ldtrsw	x0, \[x0\]
+ *[0-9a-f]+:	b880081f 	ldtrsw	xzr, \[x0\]
+ *[0-9a-f]+:	b8800be0 	ldtrsw	x0, \[sp\]
+ *[0-9a-f]+:	b89ff800 	ldtrsw	x0, \[x0, #-1\]
+ *[0-9a-f]+:	f8000800 	sttr	x0, \[x0\]
+ *[0-9a-f]+:	f800081f 	sttr	xzr, \[x0\]
+ *[0-9a-f]+:	f8000be0 	sttr	x0, \[sp\]
+ *[0-9a-f]+:	f81ff800 	sttr	x0, \[x0, #-1\]
+ *[0-9a-f]+:	f8400800 	ldtr	x0, \[x0\]
+ *[0-9a-f]+:	f840081f 	ldtr	xzr, \[x0\]
+ *[0-9a-f]+:	f8400be0 	ldtr	x0, \[sp\]
+ *[0-9a-f]+:	f85ff800 	ldtr	x0, \[x0, #-1\]
diff --git a/gas/testsuite/gas/aarch64/ldst-unpriv.s b/gas/testsuite/gas/aarch64/ldst-unpriv.s
new file mode 100644
index 0000000000000000000000000000000000000000..52f6461ce970d7465011fe940aea1521bf3f50f2
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/ldst-unpriv.s
@@ -0,0 +1,64 @@
+	sttrb	w0, [x0]
+	sttrb	wzr, [x0, #0]
+	sttrb	w0, [sp]
+	sttrb	w0, [x0, #-1]
+
+	ldtrb	w0, [x0]
+	ldtrb	wzr, [x0, #0]
+	ldtrb	w0, [sp]
+	ldtrb	w0, [x0, #-1]
+
+	ldtrsb	x0, [x0]
+	ldtrsb	xzr, [x0, #0]
+	ldtrsb	x0, [sp]
+	ldtrsb	x0, [x0, #-1]
+
+	ldtrsb	w0, [x0]
+	ldtrsb	wzr, [x0, #0]
+	ldtrsb	w0, [sp]
+	ldtrsb	w0, [x0, #-1]
+
+	sttrh	w0, [x0]
+	sttrh	wzr, [x0, #0]
+	sttrh	w0, [sp]
+	sttrh	w0, [x0, #-1]
+
+	ldtrh	w0, [x0]
+	ldtrh	wzr, [x0, #0]
+	ldtrh	w0, [sp]
+	ldtrh	w0, [x0, #-1]
+
+	ldtrsh	x0, [x0]
+	ldtrsh	xzr, [x0, #0]
+	ldtrsh	x0, [sp]
+	ldtrsh	x0, [x0, #-1]
+
+	ldtrsh	w0, [x0]
+	ldtrsh	wzr, [x0, #0]
+	ldtrsh	w0, [sp]
+	ldtrsh	w0, [x0, #-1]
+
+	sttr	w0, [x0]
+	sttr	wzr, [x0, #0]
+	sttr	w0, [sp]
+	sttr	w0, [x0, #-1]
+
+	ldtr	w0, [x0]
+	ldtr	wzr, [x0, #0]
+	ldtr	w0, [sp]
+	ldtr	w0, [x0, #-1]
+
+	ldtrsw	x0, [x0]
+	ldtrsw	xzr, [x0, #0]
+	ldtrsw	x0, [sp]
+	ldtrsw	x0, [x0, #-1]
+
+	sttr	x0, [x0]
+	sttr	xzr, [x0, #0]
+	sttr	x0, [sp]
+	sttr	x0, [x0, #-1]
+
+	ldtr	x0, [x0]
+	ldtr	xzr, [x0, #0]
+	ldtr	x0, [sp]
+	ldtr	x0, [x0, #-1]



More information about the Binutils mailing list