Wed Jul 17 21:53:45 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[glibc.git] / sysdeps / mips / jmp_buf.h
blob102a0193d839d638bab82f4d152ad0968aad8bca
1 /* Define the machine-dependent type `jmp_buf'. MIPS version.
2 Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc.
3 Contributed by Brendan Kehoe (brendan@zen.org).
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
18 Cambridge, MA 02139, USA. */
20 typedef struct
22 /* Program counter. */
23 __ptr_t __pc;
25 /* Stack pointer. */
26 __ptr_t __sp;
28 /* Callee-saved registers s0 through s7. */
29 int __regs[8];
31 /* The frame pointer. */
32 __ptr_t __fp;
34 /* The global pointer. */
35 __ptr_t __gp;
37 /* Floating point status register. */
38 int __fpc_csr;
40 /* Callee-saved floating point registers. */
41 double __fpregs[6];
42 } __jmp_buf[1];
44 #ifdef __USE_MISC
45 /* Offset to the program counter in `jmp_buf'. */
46 #define JB_PC 0
47 #endif
50 /* Test if longjmp to JMPBUF would unwind the frame
51 containing a local variable at ADDRESS. */
52 #define _JMPBUF_UNWINDS(jmpbuf, address) \
53 ((__ptr_t) (address) < (jmpbuf)[0].__sp)