• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Linux-specific definitions: */
2 
3 /* Define various structure offsets to simplify cross-compilation.  */
4 
5 /* FIXME: Currently these are only used in getcontext.S, which is only used
6    for a local unwinder, so we can use the compile-time ABI.  At a later date
7    we will want all three here, to use for signal handlers.  Also, because
8    of the three ABIs, gen-offsets.c can not quite generate this file.  */
9 
10 /* Offsets for MIPS Linux "ucontext_t":  */
11 
12 #if _MIPS_SIM == _ABIO32
13 
14 # define LINUX_UC_FLAGS_OFF	0x0
15 # define LINUX_UC_LINK_OFF	0x4
16 # define LINUX_UC_STACK_OFF	0x8
17 # define LINUX_UC_MCONTEXT_OFF	0x18
18 # define LINUX_UC_SIGMASK_OFF	0x268
19 # define LINUX_UC_MCONTEXT_PC	0x20
20 # define LINUX_UC_MCONTEXT_GREGS	0x28
21 
22 #elif _MIPS_SIM == _ABIN32
23 
24 # define LINUX_UC_FLAGS_OFF	0x0
25 # define LINUX_UC_LINK_OFF	0x4
26 # define LINUX_UC_STACK_OFF	0x8
27 # define LINUX_UC_MCONTEXT_OFF	0x18
28 # define LINUX_UC_SIGMASK_OFF	0x270
29 # define LINUX_UC_MCONTEXT_PC	0x258
30 # define LINUX_UC_MCONTEXT_GREGS	0x18
31 
32 #elif _MIPS_SIM == _ABI64
33 
34 # define LINUX_UC_FLAGS_OFF	0x0
35 # define LINUX_UC_LINK_OFF	0x8
36 # define LINUX_UC_STACK_OFF	0x10
37 # define LINUX_UC_MCONTEXT_OFF	0x28
38 # define LINUX_UC_SIGMASK_OFF	0x280
39 # define LINUX_UC_MCONTEXT_PC	0x268
40 # define LINUX_UC_MCONTEXT_GREGS	0x28
41 
42 #endif
43