Compile rockbox for Pandora using scratchbox
[maemo-rb.git] / lib / libsetjmp / setjmp.h
blobf1f5d6a89e46f16d47f7c8e21f5ffb9ef7ba7d8d
1 #ifndef _SETJMP_H_
2 #define _SETJMP_H_
4 /* Combined parts of include/setjmp.h and include/machine/setjmp.h in
5 * newlib 1.17.0, with minor changes for Rockbox.
6 */
8 #include "config.h"
9 #ifdef CPU_ARM
11 * All callee preserved registers:
12 * v1 - v7, fp, ip, sp, lr, f4, f5, f6, f7
14 #define _JBLEN 23
15 #endif
17 /* necv70 was 9 as well. */
19 #ifdef CPU_COLDFIRE
21 * onsstack,sigmask,sp,pc,psl,d2-d7,a2-a6,
22 * fp2-fp7 for 68881.
23 * All else recovered by under/over(flow) handling.
25 #define _JBLEN 34
26 #endif
28 #ifdef CPU_MIPS
29 #if CPU_MIPS == 64
30 #define _JBTYPE long long
31 #endif
32 #ifdef __mips_soft_float
33 #define _JBLEN 11
34 #else
35 #define _JBLEN 23
36 #endif
37 #endif
39 #ifdef CPU_SH
40 #define __SH5__ 0
41 #if __SH5__
42 #define _JBLEN 50
43 #define _JBTYPE long long
44 #else
45 /* r8 through r15 (callee saved), pr, fp regs if available */
46 #define _JBLEN 20
47 #endif /* __SH5__ */
48 #endif
50 #ifdef _JBLEN
51 #ifdef _JBTYPE
52 typedef _JBTYPE jmp_buf[_JBLEN];
53 #else
54 typedef int jmp_buf[_JBLEN];
55 #endif
56 #else
57 typedef int jmp_buf;
58 #endif
61 extern void longjmp(jmp_buf __jmpb, int __retval);
62 extern int setjmp(jmp_buf __jmpb);
64 #endif // _SETJMP_H_