| 1 | /* |
| 2 | * Test early exception recognition using LPSWE. |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 5 | */ |
| 6 | .org 0x8d |
| 7 | ilc: |
| 8 | .org 0x8e |
| 9 | program_interruption_code: |
| 10 | .org 0x150 |
| 11 | program_old_psw: |
| 12 | .org 0x1D0 /* program new PSW */ |
| 13 | .quad 0,pgm |
| 14 | .org 0x200 /* lowcore padding */ |
| 15 | |
| 16 | .globl _start |
| 17 | _start: |
| 18 | lpswe bad_psw |
| 19 | j failure |
| 20 | |
| 21 | pgm: |
| 22 | chhsi program_interruption_code,0x6 /* specification exception? */ |
| 23 | jne failure |
| 24 | cli ilc,0 /* ilc zero? */ |
| 25 | jne failure |
| 26 | clc program_old_psw(16),bad_psw /* correct old PSW? */ |
| 27 | jne failure |
| 28 | lpswe success_psw |
| 29 | failure: |
| 30 | lpswe failure_psw |
| 31 | |
| 32 | .align 8 |
| 33 | bad_psw: |
| 34 | .quad 0x8000000000000000,0xfedcba9876543210 /* bit 0 set */ |
| 35 | success_psw: |
| 36 | .quad 0x2000000000000,0xfff /* see is_special_wait_psw() */ |
| 37 | failure_psw: |
| 38 | .quad 0x2000000000000,0 /* disabled wait */ |