• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _JBOFFSETS_H_
2 #define _JBOFFSETS_H_
3 
4 /*
5  * Normally the same layout is used for saving the registers in jmp_buf
6  * as that used in struct sigcontext. For portability all of the registers need
7  * to be stored in the space available in a portable jmp_buf so this code
8  * packs the register together.
9  */
10 
11 #define JB_MASK         (0*REGSZ)
12 #define JB_PC           (1*REGSZ)
13 #define JB_MAGIC        (2*REGSZ)
14 #define JB_S0           (3*REGSZ)
15 #define JB_S1           (4*REGSZ)
16 #define JB_S2           (5*REGSZ)
17 #define JB_S3           (6*REGSZ)
18 #define JB_S4           (7*REGSZ)
19 #define JB_S5           (8*REGSZ)
20 #define JB_S6           (9*REGSZ)
21 #define JB_S7           (10*REGSZ)
22 #define JB_S8           (11*REGSZ)
23 #define JB_GP           (12*REGSZ)
24 #define JB_SP           (13*REGSZ)
25 #define JB_SAVEMASK     (14*REGSZ)
26 #define JB_FPUSED       (15*REGSZ)
27 #define JB_FSR          (16*REGSZ)
28 #define JB_FPBASE       (18*REGSZ)
29 #define JB_F20          (JB_FPBASE+0*REGSZ_FP)
30 #define JB_F21          (JB_FPBASE+1*REGSZ_FP)
31 #define JB_F22          (JB_FPBASE+2*REGSZ_FP)
32 #define JB_F23          (JB_FPBASE+3*REGSZ_FP)
33 #define JB_F24          (JB_FPBASE+4*REGSZ_FP)
34 #define JB_F25          (JB_FPBASE+5*REGSZ_FP)
35 #define JB_F26          (JB_FPBASE+6*REGSZ_FP)
36 #define JB_F27          (JB_FPBASE+7*REGSZ_FP)
37 #define JB_F28          (JB_FPBASE+8*REGSZ_FP)
38 #define JB_F29          (JB_FPBASE+9*REGSZ_FP)
39 #define JB_F30          (JB_FPBASE+10*REGSZ_FP)
40 #define JB_F31          (JB_FPBASE+11*REGSZ_FP)
41 
42 /* Use different magic numbers to avoid misuse of native vs portable contexts */
43 #define MAGIC_SETJMP    0xACEDBEAD
44 #define MAGIC__SETJMP   0xBEAD1CAB
45 
46 #endif /* _JBOFFSETS_H_ */
47