]> git.ipfire.org Git - thirdparty/glibc.git/blame - 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
CommitLineData
2b778ceb 1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
18a702a8
RH
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
3214b89b
AJ
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.
18a702a8
RH
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
3214b89b 13 Lesser General Public License for more details.
18a702a8 14
3214b89b 15 You should have received a copy of the GNU Lesser General Public
ab84e3ff 16 License along with the GNU C Library. If not, see
5a82c748 17 <https://www.gnu.org/licenses/>. */
09e8bdd3 18
18a702a8 19#include <sysdep.h>
09e8bdd3 20
48e0ec3c
RH
21/* To enable unwinding through the signal frame without special hackery
22 elsewhere, describe the entire struct sigcontext with unwind info.
83c784e8
RH
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. */
48e0ec3c
RH
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
18a702a8 34
48e0ec3c
RH
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
48e0ec3c
RH
49 cfi_startproc
50 cfi_return_column (64)
7d1feb56 51 .cfi_signal_frame
48e0ec3c
RH
52 SIGCONTEXT_REGS -648
53 cfi_def_cfa_offset (648)
027e32bd
RH
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
83c784e8 64__syscall_sigreturn:
48e0ec3c
RH
65 mov sp, a0
66 ldi v0, __NR_sigreturn
18a702a8 67 callsys
83c784e8
RH
68 .size __syscall_sigreturn, .-__syscall_sigreturn
69 .type __syscall_sigreturn, @function
56b98bf1
AZ
70 .global __syscall_sigreturn;
71 .hidden __syscall_sigreturn;
18a702a8 72
027e32bd 73 /* See above wrt including the nop. */
48e0ec3c 74 cfi_def_cfa_offset (176 + 648)
027e32bd
RH
75 nop
76 .align 4
77
83c784e8 78__syscall_rt_sigreturn:
18a702a8
RH
79 mov sp,a0
80 ldi v0,__NR_rt_sigreturn
81 callsys
83c784e8
RH
82 .size __syscall_rt_sigreturn, .-__syscall_rt_sigreturn
83 .type __syscall_rt_sigreturn, @function
56b98bf1
AZ
84 .global __syscall_rt_sigreturn;
85 .hidden __syscall_rt_sigreturn;
48e0ec3c 86
83c784e8 87 cfi_endproc