4 /* This is a simple version of setjmp and longjmp for MIPS 32 and 64.
6 Ian Lance Taylor, Cygnus Support, 13 May 1993. */
9 /* This file contains 32 bit assembly code. */
14 GPR_OFFSET ($16, 0); \
15 GPR_OFFSET ($17, 1); \
16 GPR_OFFSET ($18, 2); \
17 GPR_OFFSET ($19, 3); \
18 GPR_OFFSET ($20, 4); \
19 GPR_OFFSET ($21, 5); \
20 GPR_OFFSET ($22, 6); \
21 GPR_OFFSET ($23, 7); \
22 GPR_OFFSET ($29, 8); \
23 GPR_OFFSET ($30, 9); \
26 #define NUM_GPRS_SAVED 11
28 #ifdef __mips_hard_float
30 FPR_OFFSET ($f20, 0); \
31 FPR_OFFSET ($f21, 1); \
32 FPR_OFFSET ($f22, 2); \
33 FPR_OFFSET ($f23, 3); \
34 FPR_OFFSET ($f24, 4); \
35 FPR_OFFSET ($f25, 5); \
36 FPR_OFFSET ($f26, 6); \
37 FPR_OFFSET ($f27, 7); \
38 FPR_OFFSET ($f28, 8); \
39 FPR_OFFSET ($f29, 9); \
40 FPR_OFFSET ($f30, 10); \
47 #define BYTES_PER_WORD 8
51 #define STORE_FPR sdc1
53 #define BYTES_PER_WORD 4
57 #define STORE_FPR swc1
60 #define GPOFF(INDEX) (INDEX * BYTES_PER_WORD)
61 #define FPOFF(INDEX) ((INDEX + NUM_GPRS_SAVED) * BYTES_PER_WORD)
63 /* int setjmp (jmp_buf); */
69 #define GPR_OFFSET(REG, INDEX) STORE_GPR REG,GPOFF(INDEX)(a0)
70 #define FPR_OFFSET(REG, INDEX) STORE_FPR REG,FPOFF(INDEX)(a0)
81 /* volatile void longjmp (jmp_buf, int); */
87 #define GPR_OFFSET(REG, INDEX) LOAD_GPR REG,GPOFF(INDEX)(a0)
88 #define FPR_OFFSET(REG, INDEX) LOAD_FPR REG,FPOFF(INDEX)(a0)