xref: /utopia/UTPA2-700.0.x/projects/tools/lint/mips-linux-gnu_include/bits/sigcontext.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1 /* Copyright (C) 1996, 1997, 1998, 2003, 2004, 2006 Free Software
2    Foundation, Inc.  This file is part of the GNU C Library.
3 
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.
8 
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.
13 
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.  */
18 
19 #ifndef _BITS_SIGCONTEXT_H
20 #define _BITS_SIGCONTEXT_H 1
21 
22 #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
23 # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
24 #endif
25 
26 #include <sgidefs.h>
27 
28 #if _MIPS_SIM == _ABIO32
29 
30 /* Certain unused fields were replaced with new ones in 2.6.12-rc4.
31    The changes were as follows:
32 
33    sc_cause -> sc_hi1
34    sc_badvaddr -> sc_lo1
35    sc_sigset[0] -> sc_hi2
36    sc_sigset[1] -> sc_lo2
37    sc_sigset[2] -> sc_hi3
38    sc_sigset[3] -> sc_lo3
39 
40    sc_regmask, sc_ownedfp and sc_fpc_eir are not used.  */
41 struct sigcontext {
42   unsigned int sc_regmask;
43   unsigned int sc_status;
44   unsigned long long sc_pc;
45   unsigned long long sc_regs[32];
46   unsigned long long sc_fpregs[32];
47   unsigned int sc_ownedfp;
48   unsigned int sc_fpc_csr;
49   unsigned int sc_fpc_eir;
50   unsigned int sc_used_math;
51   unsigned int sc_dsp;
52   unsigned long long sc_mdhi;
53   unsigned long long sc_mdlo;
54   unsigned long sc_hi1;
55   unsigned long sc_lo1;
56   unsigned long sc_hi2;
57   unsigned long sc_lo2;
58   unsigned long sc_hi3;
59   unsigned long sc_lo3;
60 };
61 
62 #else
63 
64 /* This structure changed in 2.6.12-rc4 when DSP support was added.  */
65 struct sigcontext {
66   unsigned long long sc_regs[32];
67   unsigned long long sc_fpregs[32];
68   unsigned long long sc_mdhi;
69   unsigned long long sc_hi1;
70   unsigned long long sc_hi2;
71   unsigned long long sc_hi3;
72   unsigned long long sc_mdlo;
73   unsigned long long sc_lo1;
74   unsigned long long sc_lo2;
75   unsigned long long sc_lo3;
76   unsigned long long sc_pc;
77   unsigned int sc_fpc_csr;
78   unsigned int sc_used_math;
79   unsigned int sc_dsp;
80   unsigned int sc_reserved;
81 };
82 
83 #endif /* _MIPS_SIM != _ABIO32 */
84 #endif
85