Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


sigcontext.h
001: /* Copyright (C) 2002 Free Software Foundation, Inc.
002:    This file is part of the GNU C Library.
003: 
004:    The GNU C Library is free software; you can redistribute it and/or
005:    modify it under the terms of the GNU Lesser General Public
006:    License as published by the Free Software Foundation; either
007:    version 2.1 of the License, or (at your option) any later version.
008: 
009:    The GNU C Library is distributed in the hope that it will be useful,
010:    but WITHOUT ANY WARRANTY; without even the implied warranty of
011:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
012:    Lesser General Public License for more details.
013: 
014:    You should have received a copy of the GNU Lesser General Public
015:    License along with the GNU C Library; if not, write to the Free
016:    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
017:    02111-1307 USA.  */
018: 
019: #ifndef _BITS_SIGCONTEXT_H
020: #define _BITS_SIGCONTEXT_H  1
021: 
022: #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
023: # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
024: #endif
025: 
026: #include <bits/wordsize.h>
027: 
028: struct _fpreg
029: {
030:   unsigned short significand[4];
031:   unsigned short exponent;
032: };
033: 
034: struct _fpxreg
035: {
036:   unsigned short significand[4];
037:   unsigned short exponent;
038:   unsigned short padding[3];
039: };
040: 
041: struct _xmmreg
042: {
043:   __uint32_t    element[4];
044: };
045: 
046: 
047: 
048: #if __WORDSIZE == 32
049: 
050: struct _fpstate
051: {
052:   /* Regular FPU environment.  */
053:   __uint32_t    cw;
054:   __uint32_t            sw;
055:   __uint32_t            tag;
056:   __uint32_t            ipoff;
057:   __uint32_t            cssel;
058:   __uint32_t            dataoff;
059:   __uint32_t            datasel;
060:   struct _fpreg _st[8];
061:   unsigned short status;
062:   unsigned short magic;
063: 
064:   /* FXSR FPU environment.  */
065:   __uint32_t            _fxsr_env[6];
066:   __uint32_t            mxcsr;
067:   __uint32_t            reserved;
068:   struct _fpxreg        _fxsr_st[8];
069:   struct _xmmreg        _xmm[8];
070:   __uint32_t            padding[56];
071: };
072: 
073: #ifndef sigcontext_struct
074: /* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
075:    we need sigcontext.  Some packages have come to rely on
076:    sigcontext_struct being defined on 32-bit x86, so define this for
077:    their benefit.  */
078: # define sigcontext_struct sigcontext
079: #endif
080: 
081: struct sigcontext
082: {
083:   unsigned short gs, __gsh;
084:   unsigned short fs, __fsh;
085:   unsigned short es, __esh;
086:   unsigned short ds, __dsh;
087:   unsigned long edi;
088:   unsigned long esi;
089:   unsigned long ebp;
090:   unsigned long esp;
091:   unsigned long ebx;
092:   unsigned long edx;
093:   unsigned long ecx;
094:   unsigned long eax;
095:   unsigned long trapno;
096:   unsigned long err;
097:   unsigned long eip;
098:   unsigned short cs, __csh;
099:   unsigned long eflags;
100:   unsigned long esp_at_signal;
101:   unsigned short ss, __ssh;
102:   struct _fpstate * fpstate;
103:   unsigned long oldmask;
104:   unsigned long cr2;
105: };
106: 
107: #else /* __WORDSIZE == 64 */
108: 
109: struct _fpstate
110: {
111:   /* FPU environment matching the 64-bit FXSAVE layout.  */
112:   __uint16_t            cwd;
113:   __uint16_t            swd;
114:   __uint16_t            ftw;
115:   __uint16_t            fop;
116:   __uint64_t            rip;
117:   __uint64_t            rdp;
118:   __uint32_t            mxcsr;
119:   __uint32_t            mxcr_mask;
120:   struct _fpxreg        _st[8];
121:   struct _xmmreg        _xmm[16];
122:   __uint32_t            padding[24];
123: };
124: 
125: struct sigcontext
126: {
127:   unsigned long r8;
128:   unsigned long r9;
129:   unsigned long r10;
130:   unsigned long r11;
131:   unsigned long r12;
132:   unsigned long r13;
133:   unsigned long r14;
134:   unsigned long r15;
135:   unsigned long rdi;
136:   unsigned long rsi;
137:   unsigned long rbp;
138:   unsigned long rbx;
139:   unsigned long rdx;
140:   unsigned long rax;
141:   unsigned long rcx;
142:   unsigned long rsp;
143:   unsigned long rip;
144:   unsigned long eflags;
145:   unsigned short cs;
146:   unsigned short gs;
147:   unsigned short fs;
148:   unsigned short __pad0;
149:   unsigned long err;
150:   unsigned long trapno;
151:   unsigned long oldmask;
152:   unsigned long cr2;
153:   struct _fpstate * fpstate;
154:   unsigned long __reserved1 [8];
155: };
156: 
157: #endif /* __WORDSIZE == 64 */
158: 
159: #endif /* _BITS_SIGCONTEXT_H */
160: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/