Updated to fedora-glibc-20051020T0651
[glibc.git] / sysdeps / unix / sysv / linux / x86_64 / ucontext_i.h
blobe5099084cf3d7abc005ebed2fc336146e6496851
1 /* Offsets and other constants needed in the *context() function
2 implementation for Linux/x86-64.
3 Copyright (C) 2002, 2005 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA. */
21 #define SIG_BLOCK 0
22 #define SIG_SETMASK 2
24 /* Since we cannot include a header to define _NSIG/8, we define it
25 here. */
26 #define _NSIG8 8
28 /* Offsets of the fields in the ucontext_t structure. */
29 #define oRBP 120
30 #define oRSP 160
31 #define oRBX 128
32 #define oR8 40
33 #define oR9 48
34 #define oR12 72
35 #define oR13 80
36 #define oR14 88
37 #define oR15 96
38 #define oRDI 104
39 #define oRSI 112
40 #define oRDX 136
41 #define oRAX 144
42 #define oRCX 152
43 #define oRIP 168
44 #define oFPREGS 224
45 #define oSIGMASK 296
46 #define oFPREGSMEM 424
47 #define oMXCSR 448
49 /* Tests run in stdlib/tst-ucontext-off. */
50 #define TESTS \
51 TEST (uc_mcontext.gregs[REG_RBP], oRBP); \
52 TEST (uc_mcontext.gregs[REG_RSP], oRSP); \
53 TEST (uc_mcontext.gregs[REG_RBX], oRBX); \
54 TEST (uc_mcontext.gregs[REG_R8], oR8); \
55 TEST (uc_mcontext.gregs[REG_R9], oR9); \
56 TEST (uc_mcontext.gregs[REG_R12], oR12); \
57 TEST (uc_mcontext.gregs[REG_R13], oR13); \
58 TEST (uc_mcontext.gregs[REG_R14], oR14); \
59 TEST (uc_mcontext.gregs[REG_R15], oR15); \
60 TEST (uc_mcontext.gregs[REG_RDI], oRDI); \
61 TEST (uc_mcontext.gregs[REG_RSI], oRSI); \
62 TEST (uc_mcontext.gregs[REG_RDX], oRDX); \
63 TEST (uc_mcontext.gregs[REG_RAX], oRAX); \
64 TEST (uc_mcontext.gregs[REG_RCX], oRCX); \
65 TEST (uc_mcontext.gregs[REG_RIP], oRIP); \
66 TEST (uc_mcontext.fpregs, oFPREGS); \
67 TEST (uc_sigmask, oSIGMASK); \
68 TEST (__fpregs_mem, oFPREGSMEM); \
69 TEST (__fpregs_mem.mxcsr, oMXCSR);