(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[glibc.git] / sysdeps / mips / bits / setjmp.h
blobec0aaa020de9e2d067dddd0ff09ea0b12791592f
1 /* Define the machine-dependent type `jmp_buf'. MIPS version.
2 Copyright (C) 1992, 1993, 1995, 1997, 2000, 2002, 2003, 2004
3 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA. */
21 #ifndef _SETJMP_H
22 # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
23 #endif
25 #include <sgidefs.h>
27 typedef struct
29 #if _MIPS_SIM == _ABIO32
30 /* Program counter. */
31 __ptr_t __pc;
33 /* Stack pointer. */
34 __ptr_t __sp;
36 /* Callee-saved registers s0 through s7. */
37 int __regs[8];
39 /* The frame pointer. */
40 __ptr_t __fp;
42 /* The global pointer. */
43 __ptr_t __gp;
44 #else
45 /* Program counter. */
46 __extension__ long long __pc;
48 /* Stack pointer. */
49 __extension__ long long __sp;
51 /* Callee-saved registers s0 through s7. */
52 __extension__ long long __regs[8];
54 /* The frame pointer. */
55 __extension__ long long __fp;
57 /* The global pointer. */
58 __extension__ long long __gp;
59 #endif
61 /* Floating point status register. */
62 int __fpc_csr;
64 /* Callee-saved floating point registers. */
65 #if _MIPS_SIM == _ABI64
66 double __fpregs[8];
67 #else
68 double __fpregs[6];
69 #endif
70 } __jmp_buf[1];
72 #ifdef __USE_MISC
73 /* Offset to the program counter in `jmp_buf'. */
74 # define JB_PC 0
75 #endif
78 /* Test if longjmp to JMPBUF would unwind the frame
79 containing a local variable at ADDRESS. */
80 #define _JMPBUF_UNWINDS(jmpbuf, address) \
81 ((void *) (address) < (jmpbuf)[0].__sp)