master
h 45 lines 1.5 KB
Raw
1 /*
2 * Offsets into target signal frames for sh4 vdso.
3 *
4 * From linux-user/sh4/signal.c:
5 *
6 * struct target_sigcontext {
7 * target_ulong oldmask; // 0
8 * target_ulong sc_gregs[16]; // 4
9 * target_ulong sc_pc; // 68
10 * target_ulong sc_pr; // 72
11 * target_ulong sc_sr; // 76
12 * target_ulong sc_gbr; // 80
13 * target_ulong sc_mach; // 84
14 * target_ulong sc_macl; // 88
15 * target_ulong sc_fpregs[16]; // 92
16 * target_ulong sc_xfpregs[16]; // 156
17 * unsigned int sc_fpscr; // 220
18 * unsigned int sc_fpul; // 224
19 * unsigned int sc_ownedfp; // 228
20 * }; // sizeof = 232
21 *
22 * struct sigframe { sigcontext sc; ... }
23 * struct rt_sigframe { siginfo info[128]; ucontext uc; }
24 * ucontext = { flags[4], link[4], stack[12], sigcontext mcontext; ... }
25 * => mcontext at rt_sigframe + 128 + 20 = rt_sigframe + 148
26 */
27
28 /* Offset of sigcontext within sigframe (CFA base for sigreturn). */
29 #define SIGFRAME_SC_OFFSET 0
30
31 /* Offset of tuc_mcontext within rt_sigframe (CFA base for rt_sigreturn). */
32 #define RT_SIGFRAME_SC_OFFSET 148
33
34 /* Offsets within struct sigcontext. */
35 #define SC_GREGS 4
36 #define SC_PC 68
37 #define SC_PR 72
38 #define SC_SR 76
39 #define SC_GBR 80
40 #define SC_MACH 84
41 #define SC_MACL 88
42 #define SC_FPREGS 92
43 #define SC_XFPREGS 156
44 #define SC_FPSCR 220
45 #define SC_FPUL 224