xref: /openbmc/qemu/tests/tcg/s390x/lpsw.S (revision 86d063fa)
1/*
2 * Test the LPSW instruction.
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6    .org 0x140
7svc_old_psw:
8    .org 0x1c0                         /* supervisor call new PSW */
9    .quad 0x80000000,svc               /* 31-bit mode */
10    .org 0x200                         /* lowcore padding */
11
12    .globl _start
13_start:
14    lpsw short_psw
15lpsw_target:
16    svc 0
17expected_pswa:
18    j failure
19
20svc:
21    clc svc_old_psw(16),expected_psw   /* correct full PSW? */
22    jne failure
23    lpswe success_psw
24failure:
25    lpswe failure_psw
26
27    .align 8
28short_psw:
29    .long 0x90001,0x80000000+lpsw_target         /* problem state,
30                                                    64-bit mode */
31expected_psw:
32    .quad 0x1000180000000,expected_pswa          /* corresponds to short_psw */
33success_psw:
34    .quad 0x2000000000000,0xfff        /* see is_special_wait_psw() */
35failure_psw:
36    .quad 0x2000000000000,0            /* disabled wait */
37