| 1 | /* |
| 2 | * Common system code for specification exception testing. |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 5 | */ |
| 6 | .section .head |
| 7 | .org 0x8d |
| 8 | ilc: |
| 9 | .org 0x8e |
| 10 | program_interruption_code: |
| 11 | .org 0x150 |
| 12 | program_old_psw: |
| 13 | .org 0x1D0 /* program new PSW */ |
| 14 | .quad 0x180000000,pgm /* 64-bit mode */ |
| 15 | .org 0x200 /* lowcore padding */ |
| 16 | |
| 17 | .globl _start |
| 18 | _start: |
| 19 | lpswe test_psw |
| 20 | |
| 21 | pgm: |
| 22 | chhsi program_interruption_code,0x6 /* PGM_SPECIFICATION? */ |
| 23 | jne failure |
| 24 | lg %r0,expected_old_psw+8 /* ilc adjustment */ |
| 25 | llgc %r1,ilc |
| 26 | agr %r0,%r1 |
| 27 | stg %r0,expected_old_psw+8 |
| 28 | clc expected_old_psw(16),program_old_psw /* correct location? */ |
| 29 | jne failure |
| 30 | lpswe success_psw |
| 31 | failure: |
| 32 | lpswe failure_psw |
| 33 | |
| 34 | .align 8 |
| 35 | test_psw: |
| 36 | .quad 0x180000000,test /* 64-bit mode */ |
| 37 | success_psw: |
| 38 | .quad 0x2000180000000,0xfff /* see is_special_wait_psw() */ |
| 39 | failure_psw: |
| 40 | .quad 0x2000180000000,0 /* disabled wait */ |