malloc/Makefile: Split and sort tests
[glibc.git] / sysdeps / unix / sysv / linux / sparc / sparc32 / sigcontextinfo.h
blob6fcc2f94d9c6114e8c44631a3e09753a513d71e7
1 /* Copyright (C) 1999-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
18 #ifndef _SIGCONTEXTINFO_H
19 #define _SIGCONTEXTINFO_H
21 /* The sparc32 kernel signal frame for SA_SIGINFO is defined as:
23 struct rt_signal_frame32
25 struct sparc_stackf32 ss;
26 compat_siginfo_t info;
27 struct pt_regs32 regs; <- void *ctx
28 compat_sigset_t mask;
29 u32 fpu_save;
30 unsigned int insns[2];
31 compat_stack_t stack;
32 unsigned int extra_size;
33 siginfo_extra_v8plus_t v8plus;
34 u32 rwin_save;
35 } __attribute__((aligned(8)));
37 Unlike other architectures, sparc32 passes pt_regs32 REGS pointer as
38 the third argument to a sa_sigaction handler with SA_SIGINFO enabled. */
40 struct pt_regs32
42 unsigned int psr;
43 unsigned int pc;
44 unsigned int npc;
45 unsigned int y;
46 unsigned int u_regs[16];
49 static inline uintptr_t
50 sigcontext_get_pc (const struct pt_regs32 *ctx)
52 return ctx->pc;
55 #endif