aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg/s390x/hello-s390x-asm.S
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2023-05-11 01:02:13 +0200
committerThomas Huth <thuth@redhat.com>2023-06-05 07:27:23 +0200
commitbe4a4cb429617a8b6893733b37b6203e4b7bf35b (patch)
tree40b4a55e52c748ddbb84a0e52cdeef6aec5eecf2 /tests/tcg/s390x/hello-s390x-asm.S
parent01b9990a3fb84bb9a14017255ab1a4fa86588215 (diff)
tests/tcg/s390x: Test single-stepping SVC
Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Acked-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230510230213.330134-3-iii@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/tcg/s390x/hello-s390x-asm.S')
-rw-r--r--tests/tcg/s390x/hello-s390x-asm.S20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/tcg/s390x/hello-s390x-asm.S b/tests/tcg/s390x/hello-s390x-asm.S
new file mode 100644
index 0000000000..2e9faa1604
--- /dev/null
+++ b/tests/tcg/s390x/hello-s390x-asm.S
@@ -0,0 +1,20 @@
+/*
+ * Hello, World! in assembly.
+ */
+
+.globl _start
+_start:
+
+/* puts("Hello, World!"); */
+lghi %r2,1
+larl %r3,foo
+lghi %r4,foo_end-foo
+svc 4
+
+/* exit(0); */
+xgr %r2,%r2
+svc 1
+
+.align 2
+foo: .asciz "Hello, World!\n"
+foo_end: