setjmp.h revision c124baaf29a948fd8b93e7f1fefc20b659271026
1/*
2 * Copyright (C) 2012 The Android Open Source Project
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *  * Redistributions of source code must retain the above copyright
9 *    notice, this list of conditions and the following disclaimer.
10 *  * Redistributions in binary form must reproduce the above copyright
11 *    notice, this list of conditions and the following disclaimer in
12 *    the documentation and/or other materials provided with the
13 *    distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29#ifndef _ARCH_MIPS_MACHINE_SETJMP_H_
30#define _ARCH_MIPS_MACHINE_SETJMP_H_
31
32#define _JBLEN          157    /* size, in longs, of a jmp_buf */
33
34#define SC_REGMASK      (0*REGSZ)
35#define SC_STATUS       (1*REGSZ)
36#define SC_PC           (2*REGSZ)
37#define SC_REGS         (SC_PC+8)
38#define SC_FPREGS       (SC_REGS+32*8)
39#define SC_ACX          (SC_FPREGS+32*REGSZ_FP)
40#define SC_FPC_CSR      (SC_ACX+1*REGSZ)
41#define SC_FPC_EIR      (SC_ACX+2*REGSZ)
42#define SC_USED_MATH    (SC_ACX+3*REGSZ)
43#define SC_DSP          (SC_ACX+4*REGSZ)
44#define SC_MDHI         (SC_ACX+5*REGSZ)
45#define SC_MDLO         (SC_MDHI+8)
46#define SC_HI1          (SC_MDLO+8)
47#define SC_LO1          (SC_HI1+1*REGSZ)
48#define SC_HI2          (SC_HI1+2*REGSZ)
49#define SC_LO2          (SC_HI1+3*REGSZ)
50#define SC_HI3          (SC_HI1+4*REGSZ)
51#define SC_LO3          (SC_HI1+5*REGSZ)
52/* OpenBSD compatibility */
53#define SC_MASK         SC_REGMASK
54#define SC_FPUSED       SC_USED_MATH
55
56#endif /* !_ARCH_MIPS_INCLUDE_MACHINE_SETJMP_H_ */
57