aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2023-02-20 08:40:30 -1000
committerThomas Huth <thuth@redhat.com>2023-02-27 09:15:39 +0100
commitc78d9269755dce56ac8d16181af46aa969aa7755 (patch)
treee04e64edaab8b5baf17d551bd095492f0890ded7 /tests/tcg
parent2b0fa727f7d02176a2c620093810402cc744072b (diff)
downloadqemu-c78d9269755dce56ac8d16181af46aa969aa7755.zip
qemu-c78d9269755dce56ac8d16181af46aa969aa7755.tar.gz
qemu-c78d9269755dce56ac8d16181af46aa969aa7755.tar.bz2
tests/tcg/s390x: Add bal.S
Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20221103130011.2670186-1-iii@linux.ibm.com> Message-Id: <20230220184052.163465-6-richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/tcg')
-rw-r--r--tests/tcg/s390x/Makefile.softmmu-target1
-rw-r--r--tests/tcg/s390x/bal.S24
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Makefile.softmmu-target
index 50c1b88..bcbe936 100644
--- a/tests/tcg/s390x/Makefile.softmmu-target
+++ b/tests/tcg/s390x/Makefile.softmmu-target
@@ -7,3 +7,4 @@ QEMU_OPTS=-action panic=exit-failure -kernel
-Wl,--build-id=none $< -o $@
TESTS += unaligned-lowcore
+TESTS += bal
diff --git a/tests/tcg/s390x/bal.S b/tests/tcg/s390x/bal.S
new file mode 100644
index 0000000..e54d887
--- /dev/null
+++ b/tests/tcg/s390x/bal.S
@@ -0,0 +1,24 @@
+ .org 0x200 /* lowcore padding */
+ .globl _start
+_start:
+ lpswe start24_psw
+_start24:
+ lgrl %r0,initial_r0
+ lgrl %r1,expected_r0
+ bal %r0,0f
+0:
+ cgrjne %r0,%r1,1f
+ lpswe success_psw
+1:
+ lpswe failure_psw
+ .align 8
+start24_psw:
+ .quad 0x160000000000,_start24 /* 24-bit mode, cc = 1, pm = 6 */
+initial_r0:
+ .quad 0x1234567887654321
+expected_r0:
+ .quad 0x1234567896000000 + 0b /* ilc = 2, cc = 1, pm = 6 */
+success_psw:
+ .quad 0x2000000000000,0xfff /* see is_special_wait_psw() */
+failure_psw:
+ .quad 0x2000000000000,0 /* disabled wait */