]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / sparc / sparc32 / sigcontextinfo.h
1 /* Copyright (C) 1999-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Jakub Jelinek <jakub@redhat.com>, 1999.
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 <https://www.gnu.org/licenses/>. */
18
19 #ifndef _SIGCONTEXTINFO_H
20 #define _SIGCONTEXTINFO_H
21
22 /* The sparc32 kernel signal frame for SA_SIGINFO is defined as:
23
24 struct rt_signal_frame32
25 {
26 struct sparc_stackf32 ss;
27 compat_siginfo_t info;
28 struct pt_regs32 regs; <- void *ctx
29 compat_sigset_t mask;
30 u32 fpu_save;
31 unsigned int insns[2];
32 compat_stack_t stack;
33 unsigned int extra_size;
34 siginfo_extra_v8plus_t v8plus;
35 u32 rwin_save;
36 } __attribute__((aligned(8)));
37
38 Unlike other architectures, sparc32 passes pt_regs32 REGS pointer as
39 the third argument to a sa_sigaction handler with SA_SIGINFO enabled. */
40
41 struct pt_regs32
42 {
43 unsigned int psr;
44 unsigned int pc;
45 unsigned int npc;
46 unsigned int y;
47 unsigned int u_regs[16];
48 };
49
50 static inline uintptr_t
51 sigcontext_get_pc (const struct pt_regs32 *ctx)
52 {
53 return ctx->pc;
54 }
55
56 #endif