]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / alpha / rt_sigaction.S
1 /* Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Richard Henderson <rth@cygnus.com>, 1998
4
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.
9
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.
14
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/>. */
18
19 #include <sysdep.h>
20
21 /* To enable unwinding through the signal frame without special hackery
22 elsewhere, describe the entire struct sigcontext with unwind info.
23
24 In order to minimize the size of the encoding, we set the CFA to the
25 end of the sigcontext, which makes all of the registers have small
26 negative offsets from that. */
27
28 .macro SIGCONTEXT_REGS_I base, from=0
29 cfi_offset (\from, \base + (4 + \from) * 8)
30 .if 30-\from
31 SIGCONTEXT_REGS_I \base, "(\from+1)"
32 .endif
33 .endm
34
35 .macro SIGCONTEXT_REGS_F base, from=32
36 cfi_offset (\from, \base + (4 + 1 + \from) * 8)
37 .if 62-\from
38 SIGCONTEXT_REGS_F \base, "(\from+1)"
39 .endif
40 .endm
41
42 .macro SIGCONTEXT_REGS base
43 SIGCONTEXT_REGS_I \base
44 SIGCONTEXT_REGS_F \base
45 cfi_offset (63, \base + (4 + 32 + 1 + 32) * 8)
46 cfi_offset (64, \base + 2 * 8)
47 .endm
48
49 cfi_startproc
50 cfi_return_column (64)
51 .cfi_signal_frame
52 SIGCONTEXT_REGS -648
53 cfi_def_cfa_offset (648)
54
55 /* While this frame is marked as a signal frame, that only applies
56 to how this return address is handled for the outer frame.
57 The return address that arrived here, from the inner frame, is
58 not marked as a signal frame and so the unwinder still tries to
59 subtract 1 to examine the presumed call insn. Thus we must
60 extend the unwind info to a nop before the start. */
61 nop
62 .align 4
63
64 __syscall_sigreturn:
65 mov sp, a0
66 ldi v0, __NR_sigreturn
67 callsys
68 .size __syscall_sigreturn, .-__syscall_sigreturn
69 .type __syscall_sigreturn, @function
70 .global __syscall_sigreturn;
71 .hidden __syscall_sigreturn;
72
73 /* See above wrt including the nop. */
74 cfi_def_cfa_offset (176 + 648)
75 nop
76 .align 4
77
78 __syscall_rt_sigreturn:
79 mov sp,a0
80 ldi v0,__NR_rt_sigreturn
81 callsys
82 .size __syscall_rt_sigreturn, .-__syscall_rt_sigreturn
83 .type __syscall_rt_sigreturn, @function
84 .global __syscall_rt_sigreturn;
85 .hidden __syscall_rt_sigreturn;
86
87 cfi_endproc