| 1 | /* |
| 2 | * Test the LPSW instruction. |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 5 | */ |
| 6 | .org 0x140 |
| 7 | svc_old_psw: |
| 8 | .org 0x1c0 /* supervisor call new PSW */ |
| 9 | .quad 0x80000000,svc /* 31-bit mode */ |
| 10 | .org 0x200 /* lowcore padding */ |
| 11 | |
| 12 | .globl _start |
| 13 | _start: |
| 14 | lpsw short_psw |
| 15 | lpsw_target: |
| 16 | svc 0 |
| 17 | expected_pswa: |
| 18 | j failure |
| 19 | |
| 20 | svc: |
| 21 | clc svc_old_psw(16),expected_psw /* correct full PSW? */ |
| 22 | jne failure |
| 23 | lpswe success_psw |
| 24 | failure: |
| 25 | lpswe failure_psw |
| 26 | |
| 27 | .align 8 |
| 28 | short_psw: |
| 29 | .long 0x90001,0x80000000+lpsw_target /* problem state, |
| 30 | 64-bit mode */ |
| 31 | expected_psw: |
| 32 | .quad 0x1000180000000,expected_pswa /* corresponds to short_psw */ |
| 33 | success_psw: |
| 34 | .quad 0x2000000000000,0xfff /* see is_special_wait_psw() */ |
| 35 | failure_psw: |
| 36 | .quad 0x2000000000000,0 /* disabled wait */ |