xref: /openbmc/qemu/tests/tcg/s390x/exrl-ssm-early.S (revision 4921d0a7)
1/*
2 * Test early exception recognition using EXRL + SSM.
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6    .org 0x8d
7ilc:
8    .org 0x8e
9program_interruption_code:
10    .org 0x150
11program_old_psw:
12    .org 0x1D0                         /* program new PSW */
13    .quad 0,pgm
14    .org 0x200                         /* lowcore padding */
15
16    .globl _start
17_start:
18    exrl %r0,ssm
19expected_pswa:
20    j failure
21ssm:
22    ssm ssm_op
23
24pgm:
25    chhsi program_interruption_code,0x6          /* specification exception? */
26    jne failure
27    cli ilc,6                                    /* ilc for EXRL? */
28    jne failure
29    clc program_old_psw(16),expected_old_psw     /* correct old PSW? */
30    jne failure
31    lpswe success_psw
32failure:
33    lpswe failure_psw
34
35ssm_op:
36    .byte 0x08                                   /* bit 4 set */
37    .align 8
38expected_old_psw:
39    .quad 0x0800000180000000,expected_pswa       /* bit 2 set */
40success_psw:
41    .quad 0x2000000000000,0xfff        /* see is_special_wait_psw() */
42failure_psw:
43    .quad 0x2000000000000,0            /* disabled wait */
44