Skip to content

Commit

Permalink
tests/tcg/s390x: Test LRA
Browse files Browse the repository at this point in the history
Add a small test to prevent regressions.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230704081506.276055-11-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
iii-i authored and huth committed Jul 10, 2023
1 parent ccf02c2 commit 5222c2e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/tcg/s390x/Makefile.softmmu-target
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ASM_TESTS = \
sam \
lpsw \
lpswe-early \
lra \
ssm-early \
stosm-early \
unaligned-lowcore
Expand Down
19 changes: 19 additions & 0 deletions tests/tcg/s390x/lra.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.org 0x200 /* lowcore padding */
.globl _start
_start:
lgrl %r1,initial_r1
lra %r1,0(%r1)
cgrl %r1,expected_r1
jne 1f
lpswe success_psw
1:
lpswe failure_psw
.align 8
initial_r1:
.quad 0x8765432112345678
expected_r1:
.quad 0x8765432180000038 /* ASCE type exception */
success_psw:
.quad 0x2000000000000,0xfff /* see is_special_wait_psw() */
failure_psw:
.quad 0x2000000000000,0 /* disabled wait */

0 comments on commit 5222c2e

Please sign in to comment.