xref: /openbmc/qemu/tests/tcg/s390x/ssm-early.S (revision d2dfe0b5)
1/*
2 * Test early exception recognition using 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    ssm ssm_op
19expected_pswa:
20    j failure
21
22pgm:
23    chhsi program_interruption_code,0x6          /* specification exception? */
24    jne failure
25    cli ilc,4                                    /* ilc for SSM? */
26    jne failure
27    clc program_old_psw(16),expected_old_psw     /* correct old PSW? */
28    jne failure
29    lpswe success_psw
30failure:
31    lpswe failure_psw
32
33ssm_op:
34    .byte 0x20                                   /* bit 2 set */
35    .align 8
36expected_old_psw:
37    .quad 0x2000000180000000,expected_pswa       /* bit 2 set */
38success_psw:
39    .quad 0x2000000000000,0xfff        /* see is_special_wait_psw() */
40failure_psw:
41    .quad 0x2000000000000,0            /* disabled wait */
42