1 #ifdef __aarch64__
2 # define STATIC_CHAIN_REG  "x18"
3 #elif defined(__alpha__)
4 # define STATIC_CHAIN_REG  "$1"
5 #elif defined(__arm__)
6 # define STATIC_CHAIN_REG  "ip"
7 #elif defined(__hppa__)
8 # if defined(__LP64)
9 #   define define STATIC_CHAIN_REG  "%r31"
10 # else
11 #   define define STATIC_CHAIN_REG  "%r29"   /* %ret1 */
12 # endif
13 #elif defined(__sparc__)
14 # if defined(__arch64__) || defined(__sparcv9)
15 #  define STATIC_CHAIN_REG "g5"
16 # else
17 #  define STATIC_CHAIN_REG "g2"
18 # endif
19 #elif defined(__x86_64__)
20 # define STATIC_CHAIN_REG  "r10"
21 #elif defined(__i386__)
22 # ifndef ABI_NUM
23 #  define STATIC_CHAIN_REG  "ecx"	/* FFI_DEFAULT_ABI only */
24 # endif
25 #endif
26