]>
git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/sh/sys/ucontext.h
1 /* Copyright (C) 1999-2023 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 /* Where is System V/SH ABI? */
20 #ifndef _SYS_UCONTEXT_H
21 #define _SYS_UCONTEXT_H 1
25 #include <bits/types/sigset_t.h>
26 #include <bits/types/stack_t.h>
31 /* Number of general registers. */
34 # define NGREG __NGREG
37 /* Container for all general registers. */
38 typedef greg_t gregset_t
[__NGREG
];
41 /* Number of each register is the `gregset_t' array. */
45 # define REG_R0 REG_R0
47 # define REG_R1 REG_R1
49 # define REG_R2 REG_R2
51 # define REG_R3 REG_R3
53 # define REG_R4 REG_R4
55 # define REG_R5 REG_R5
57 # define REG_R6 REG_R6
59 # define REG_R7 REG_R7
61 # define REG_R8 REG_R8
63 # define REG_R9 REG_R9
65 # define REG_R10 REG_R10
67 # define REG_R11 REG_R11
69 # define REG_R12 REG_R12
71 # define REG_R13 REG_R13
73 # define REG_R14 REG_R14
75 # define REG_R15 REG_R15
81 /* Number of FPU registers. */
84 # define NFPREG __NFPREG
87 /* Structure to describe FPU registers. */
88 typedef freg_t fpregset_t
[__NFPREG
];
91 # define __ctx(fld) fld
93 # define __ctx(fld) __ ## fld
96 /* Context to describe whole processor state. */
99 unsigned int __ctx(oldmask
);
100 gregset_t
__ctx(gregs
);
101 unsigned int __ctx(pc
);
102 unsigned int __ctx(pr
);
103 unsigned int __ctx(sr
);
104 unsigned int __ctx(gbr
);
105 unsigned int __ctx(mach
);
106 unsigned int __ctx(macl
);
107 fpregset_t
__ctx(fpregs
);
108 fpregset_t
__ctx(xfpregs
);
109 unsigned int __ctx(fpscr
);
110 unsigned int __ctx(fpul
);
111 unsigned int __ctx(ownedfp
);
114 /* Userlevel context. */
115 typedef struct ucontext_t
117 unsigned long int __ctx(uc_flags
);
118 struct ucontext_t
*uc_link
;
120 mcontext_t uc_mcontext
;
126 #endif /* sys/ucontext.h */