diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2023-03-16 17:44:28 +0100 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2023-03-20 09:32:50 +0100 |
commit | e902126caea1695aa89da97ef5804a9131224313 (patch) | |
tree | fc1835557a848f5505bf7d0465e6fb7fb5cadb23 /tests/tcg/s390x/stgrl-unaligned.S | |
parent | ba1ef833be73d2b2f40e0205a6ce77871873f5fd (diff) |
tests/tcg/s390x: Test unaligned accesses
Add a number of small test that check whether accessing unaligned
addresses in various ways leads to a specification exception.
Run these test both in softmmu and user configurations; expect a PGM
in one case and SIGILL in the other.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230316164428.275147-13-iii@linux.ibm.com>
[thuth: Added -Wl,--build-id=none to LDFLAGS]
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/tcg/s390x/stgrl-unaligned.S')
-rw-r--r-- | tests/tcg/s390x/stgrl-unaligned.S | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/tcg/s390x/stgrl-unaligned.S b/tests/tcg/s390x/stgrl-unaligned.S new file mode 100644 index 0000000000..32df37780a --- /dev/null +++ b/tests/tcg/s390x/stgrl-unaligned.S @@ -0,0 +1,16 @@ +/* + * Test STGRL to a non-doubleword aligned address. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + .globl test +test: + stgrl %r1,unaligned + + .align 8 + .globl expected_old_psw +expected_old_psw: + .quad 0x180000000,test + .long 0 +unaligned: + .quad 0 |