update from main archive 960910
[glibc.git] / sysdeps / mach / hurd / mips / sigcontext.h
blob81d1f25f25d1072a42284684a9dd7059b1dd00d2
1 /* Copyright (C) 1994 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 Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 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 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If
16 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
17 Cambridge, MA 02139, USA. */
19 /* Signal handlers are actually called:
20 void handler (int sig, int code, struct sigcontext *scp); */
22 /* State of this thread when the signal was taken. */
23 struct sigcontext
25 /* These first members are machine-independent. */
27 int sc_onstack; /* Nonzero if running on sigstack. */
28 __sigset_t sc_mask; /* Blocked signals to restore. */
30 /* MiG reply port this thread is using. */
31 unsigned int sc_reply_port;
33 /* Port this thread is doing an interruptible RPC on. */
34 unsigned int sc_intr_port;
36 /* Error code associated with this signal (interpreted as `error_t'). */
37 int sc_error;
39 /* All following members are machine-dependent. The rest of this
40 structure is written to be laid out identically to:
42 struct mips_thread_state ts;
43 struct mips_exc_state es;
44 struct mips_float_state fs;
46 trampoline.c knows this, so it must be changed if this changes. */
47 #define sc_mips_thread_state sc_gpr /* Beginning of correspondence. */
48 int sc_gpr[31]; /* "General" registers; [0] is r1. */
49 int sc_mdlo, sc_mdhi; /* Low and high multiplication results. */
50 int sc_pc; /* Instruction pointer. */
52 /* struct mips_exc_state */
53 #define sc_mips_exc_state sc_cause
54 unsigned int sc_cause; /* Machine-level trap code. */
55 #define SC_CAUSE_SST 0x00000044
56 unsigned int sc_badvaddr;
57 unsigned int sc_coproc_used; /* Which coprocessors the thread has used. */
58 #define SC_COPROC_USE_COP0 1 /* (by definition) */
59 #define SC_COPROC_USE_COP1 2 /* FPA */
60 #define SC_COPROC_USE_FPU SC_COPROC_USE_COP1
61 #define SC_COPROC_USE_COP2 4
62 #define SC_COPROC_USE_COP3 8
64 /* struct mips_float_state
65 This is only filled in if the SC_COPROC_USE_FPU bit
66 is set in sc_coproc_used. */
67 #define sc_mips_float_state sc_fpr
68 int sc_fpr[32]; /* FP registers. */
69 int sc_fpcsr; /* FPU status register. */
70 int sc_fpeir; /* FP exception instruction register. */