S390: Don't use r11 for cu-instructions as used as frame-pointer. [BZ# 32192]
[glibc.git] / sysdeps / unix / sysv / linux / hppa / syscall_cancel.S
blobb9c19747ea91b95b7cb029265a961e692297c267
1 /* Cancellable syscall wrapper.  Linux/hppa version.
2    Copyright (C) 2023 Free Software Foundation, Inc.
3    This file is part of the GNU C Library.
5    The GNU C Library is free software; you can redistribute it and/or
6    modify it under the terms of the GNU Lesser General Public
7    License as published by the Free Software Foundation; either
8    version 2.1 of the License, or (at your option) any later version.
10    The GNU C Library is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    Lesser General Public License for more details.
15    You should have received a copy of the GNU Lesser General Public
16    License along with the GNU C Library.  If not, see
17    <http://www.gnu.org/licenses/>.  */
19 #include <sysdep.h>
20 #include <descr-const.h>
22 /* long int __syscall_cancel_arch (int *cancelhandling,
23                                    long int nr,
24                                    long int arg1,
25                                    long int arg2,
26                                    long int arg3,
27                                    long int arg4,
28                                    long int arg5,
29                                    long int arg6)  */
31         .text
32 ENTRY(__syscall_cancel_arch)
33         stw     %r2,-20(%r30)
34         ldo     128(%r30),%r30
35         cfi_def_cfa_offset (-128)
36         cfi_offset (2, -20)
37         ldw     -180(%r30),%r28
38         copy    %r26,%r20
39         stw     %r28,-108(%r30)
40         ldw     -184(%r30),%r28
41         copy    %r24,%r26
42         stw     %r28,-112(%r30)
43         ldw     -188(%r30),%r28
44         stw     %r28,-116(%r30)
45         ldw     -192(%r30),%r28
46         stw     %r4,-104(%r30)
47         stw     %r28,-120(%r30)
48         copy    %r25,%r28
49         copy    %r23,%r25
50 #ifdef __PIC__
51         stw     %r19,-32(%r30)
52 #endif
53         cfi_offset (4, 24)
55         .global __syscall_cancel_arch_start
56 __syscall_cancel_arch_start:
57         ldw     0(%r20),%r20
58         bb,<    %r20,31-TCB_CANCELED_BIT,1f
59         ldw     -120(%r30),%r21
60         ldw     -116(%r30),%r22
61         ldw     -112(%r30),%r23
62         ldw     -108(%r30),%r24
63         copy    %r19, %r4
64         ble     0x100(%sr2, %r0)
66         .global __syscall_cancel_arch_end
67 __syscall_cancel_arch_end:
69         copy    %r28,%r20
70         copy    %r4,%r19
72         ldw     -148(%r30),%r2
73         ldw     -104(%r30),%r4
74         bv      %r0(%r2)
75         ldo     -128(%r30),%r30
77         bl      __syscall_do_cancel,%r2
78         nop
79         nop
81 END(__syscall_cancel_arch)