xref: /openbmc/qemu/tests/tcg/s390x/mc.S (revision 3ee44ec72753ec0ff05ad1569dfa609203d722b2)
1*eacfe7cbSIlya Leoshkevich    .org 0x8d
2*eacfe7cbSIlya Leoshkevichilc:
3*eacfe7cbSIlya Leoshkevich    .org 0x8e
4*eacfe7cbSIlya Leoshkevichprogram_interruption_code:
5*eacfe7cbSIlya Leoshkevich    .org 0x94
6*eacfe7cbSIlya Leoshkevichmonitor_class:
7*eacfe7cbSIlya Leoshkevich    .org 0xb0
8*eacfe7cbSIlya Leoshkevichmonitor_code:
9*eacfe7cbSIlya Leoshkevich    .org 0x150
10*eacfe7cbSIlya Leoshkevichprogram_old_psw:
11*eacfe7cbSIlya Leoshkevich    .org 0x1d0                              /* program new PSW */
12*eacfe7cbSIlya Leoshkevich    .quad 0x180000000,pgm                   /* 64-bit mode */
13*eacfe7cbSIlya Leoshkevich    .org 0x200                              /* lowcore padding */
14*eacfe7cbSIlya Leoshkevich    .globl _start
15*eacfe7cbSIlya Leoshkevich_start:
16*eacfe7cbSIlya Leoshkevich    stctg %c8,%c8,c8                        /* enable only monitor class 1 */
17*eacfe7cbSIlya Leoshkevich    mvhhi c8+6,0x4000
18*eacfe7cbSIlya Leoshkevich    lctlg %c8,%c8,c8
19*eacfe7cbSIlya Leoshkevichmc_nop:
20*eacfe7cbSIlya Leoshkevich    mc 123,0
21*eacfe7cbSIlya Leoshkevichmc_monitor_event:
22*eacfe7cbSIlya Leoshkevich    mc 321,1
23*eacfe7cbSIlya Leoshkevich    j failure
24*eacfe7cbSIlya Leoshkevichmc_specification:
25*eacfe7cbSIlya Leoshkevich    mc 333,16
26*eacfe7cbSIlya Leoshkevich    j failure
27*eacfe7cbSIlya Leoshkevichpgm:
28*eacfe7cbSIlya Leoshkevich    lgrl %r0,program_old_psw+8              /* ilc adjustment */
29*eacfe7cbSIlya Leoshkevich    llgc %r1,ilc
30*eacfe7cbSIlya Leoshkevich    sgr %r0,%r1
31*eacfe7cbSIlya Leoshkevich    larl %r1,mc_monitor_event               /* dispatch based on old PSW */
32*eacfe7cbSIlya Leoshkevich    cgrje %r0,%r1,pgm_monitor_event
33*eacfe7cbSIlya Leoshkevich    larl %r1,mc_specification
34*eacfe7cbSIlya Leoshkevich    cgrje %r0,%r1,pgm_specification
35*eacfe7cbSIlya Leoshkevich    j failure
36*eacfe7cbSIlya Leoshkevichpgm_monitor_event:
37*eacfe7cbSIlya Leoshkevich    chhsi program_interruption_code,0x40    /* monitor event? */
38*eacfe7cbSIlya Leoshkevich    jne failure
39*eacfe7cbSIlya Leoshkevich    chhsi monitor_class,1                   /* class from mc_monitor_event? */
40*eacfe7cbSIlya Leoshkevich    jne failure
41*eacfe7cbSIlya Leoshkevich    cghsi monitor_code,321                  /* code from mc_monitor_event? */
42*eacfe7cbSIlya Leoshkevich    jne failure
43*eacfe7cbSIlya Leoshkevich    j mc_specification                      /* next test */
44*eacfe7cbSIlya Leoshkevichpgm_specification:
45*eacfe7cbSIlya Leoshkevich    chhsi program_interruption_code,6       /* specification exception? */
46*eacfe7cbSIlya Leoshkevich    jne failure
47*eacfe7cbSIlya Leoshkevich    lpswe success_psw
48*eacfe7cbSIlya Leoshkevichfailure:
49*eacfe7cbSIlya Leoshkevich    lpswe failure_psw
50*eacfe7cbSIlya Leoshkevich    .align 8
51*eacfe7cbSIlya Leoshkevichc8:
52*eacfe7cbSIlya Leoshkevich    .quad 0
53*eacfe7cbSIlya Leoshkevichsuccess_psw:
54*eacfe7cbSIlya Leoshkevich    .quad 0x2000000000000,0xfff             /* see is_special_wait_psw() */
55*eacfe7cbSIlya Leoshkevichfailure_psw:
56*eacfe7cbSIlya Leoshkevich    .quad 0x2000000000000,0                 /* disabled wait */
57