(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[glibc.git] / sysdeps / unix / sysv / linux / x86_64 / bits / sigcontext.h
blob08d4c52b2f17cf8e0de4650971ca367169ffc77a
1 /* Copyright (C) 2002 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, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 02111-1307 USA. */
19 #ifndef _BITS_SIGCONTEXT_H
20 #define _BITS_SIGCONTEXT_H 1
22 #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
23 # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
24 #endif
26 #include <bits/wordsize.h>
28 struct _fpreg
30 unsigned short significand[4];
31 unsigned short exponent;
34 struct _fpxreg
36 unsigned short significand[4];
37 unsigned short exponent;
38 unsigned short padding[3];
41 struct _xmmreg
43 __uint32_t element[4];
48 #if __WORDSIZE == 32
50 struct _fpstate
52 /* Regular FPU environment. */
53 __uint32_t cw;
54 __uint32_t sw;
55 __uint32_t tag;
56 __uint32_t ipoff;
57 __uint32_t cssel;
58 __uint32_t dataoff;
59 __uint32_t datasel;
60 struct _fpreg _st[8];
61 unsigned short status;
62 unsigned short magic;
64 /* FXSR FPU environment. */
65 __uint32_t _fxsr_env[6];
66 __uint32_t mxcsr;
67 __uint32_t reserved;
68 struct _fpxreg _fxsr_st[8];
69 struct _xmmreg _xmm[8];
70 __uint32_t padding[56];
73 struct sigcontext
75 unsigned short gs, __gsh;
76 unsigned short fs, __fsh;
77 unsigned short es, __esh;
78 unsigned short ds, __dsh;
79 unsigned long edi;
80 unsigned long esi;
81 unsigned long ebp;
82 unsigned long esp;
83 unsigned long ebx;
84 unsigned long edx;
85 unsigned long ecx;
86 unsigned long eax;
87 unsigned long trapno;
88 unsigned long err;
89 unsigned long eip;
90 unsigned short cs, __csh;
91 unsigned long eflags;
92 unsigned long esp_at_signal;
93 unsigned short ss, __ssh;
94 struct _fpstate * fpstate;
95 unsigned long oldmask;
96 unsigned long cr2;
99 #else /* __WORDSIZE == 64 */
101 struct _fpstate
103 /* FPU environment matching the 64-bit FXSAVE layout. */
104 __uint16_t cwd;
105 __uint16_t swd;
106 __uint16_t ftw;
107 __uint16_t fop;
108 __uint64_t rip;
109 __uint64_t rdp;
110 __uint32_t mxcsr;
111 __uint32_t mxcr_mask;
112 struct _fpxreg _st[8];
113 struct _xmmreg _xmm[16];
114 __uint32_t padding[24];
117 struct sigcontext
119 unsigned long r8;
120 unsigned long r9;
121 unsigned long r10;
122 unsigned long r11;
123 unsigned long r12;
124 unsigned long r13;
125 unsigned long r14;
126 unsigned long r15;
127 unsigned long rdi;
128 unsigned long rsi;
129 unsigned long rbp;
130 unsigned long rbx;
131 unsigned long rdx;
132 unsigned long rax;
133 unsigned long rcx;
134 unsigned long rsp;
135 unsigned long rip;
136 unsigned long eflags;
137 unsigned short cs;
138 unsigned short gs;
139 unsigned short fs;
140 unsigned short __pad0;
141 unsigned long err;
142 unsigned long trapno;
143 unsigned long oldmask;
144 unsigned long cr2;
145 struct _fpstate * fpstate;
146 unsigned long __reserved1 [8];
149 #endif /* __WORDSIZE == 64 */
151 #endif /* _BITS_SIGCONTEXT_H */