aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg/s390x/hello-s390x-asm.S
diff options
context:
space:
mode:
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: