li reg_ALLOC,4
#if defined(LISP_FEATURE_SB_THREAD)
- stw reg_ZERO,THREAD_FOREIGN_FUNCTION_CALL_ACTIVE_OFFSET(reg_L2)
- lwz reg_BSP,THREAD_BINDING_STACK_POINTER_OFFSET(reg_L2)
- lwz reg_CSP,THREAD_CONTROL_STACK_POINTER_OFFSET(reg_L2)
- lwz reg_OCFP,THREAD_CONTROL_FRAME_POINTER_OFFSET(reg_L2)
+ stw reg_ZERO,THREAD_FOREIGN_FUNCTION_CALL_ACTIVE_OFFSET(reg_THREAD)
+ lwz reg_BSP,THREAD_BINDING_STACK_POINTER_OFFSET(reg_THREAD)
+ lwz reg_CSP,THREAD_CONTROL_STACK_POINTER_OFFSET(reg_THREAD)
+ lwz reg_OCFP,THREAD_CONTROL_FRAME_POINTER_OFFSET(reg_THREAD)
#else
store(reg_ZERO,reg_NL4,CSYMBOL(foreign_function_call_active))
load(reg_BSP,CSYMBOL(current_binding_stack_pointer))
#if defined(LISP_FEATURE_SB_THREAD)
/* Store lisp state */
- stw reg_BSP,THREAD_BINDING_STACK_POINTER_OFFSET(reg_L2)
- stw reg_CSP,THREAD_CONTROL_STACK_POINTER_OFFSET(reg_L2)
- stw reg_CFP,THREAD_CONTROL_FRAME_POINTER_OFFSET(reg_L2)
+ stw reg_BSP,THREAD_BINDING_STACK_POINTER_OFFSET(reg_THREAD)
+ stw reg_CSP,THREAD_CONTROL_STACK_POINTER_OFFSET(reg_THREAD)
+ stw reg_CFP,THREAD_CONTROL_FRAME_POINTER_OFFSET(reg_THREAD)
/* No longer in Lisp. */
- stw reg_ALLOC,THREAD_FOREIGN_FUNCTION_CALL_ACTIVE_OFFSET(reg_L2)
+ stw reg_ALLOC,THREAD_FOREIGN_FUNCTION_CALL_ACTIVE_OFFSET(reg_THREAD)
#else
/* Store lisp state */
clrrwi reg_NL1,reg_ALLOC,3
#ifdef LISP_FEATURE_SB_THREAD
/* Store Lisp state */
- stw reg_BSP,THREAD_BINDING_STACK_POINTER_OFFSET(reg_L2)
- stw reg_CSP,THREAD_CONTROL_STACK_POINTER_OFFSET(reg_L2)
- stw reg_CFP,THREAD_CONTROL_FRAME_POINTER_OFFSET(reg_L2)
+ stw reg_BSP,THREAD_BINDING_STACK_POINTER_OFFSET(reg_THREAD)
+ stw reg_CSP,THREAD_CONTROL_STACK_POINTER_OFFSET(reg_THREAD)
+ stw reg_CFP,THREAD_CONTROL_FRAME_POINTER_OFFSET(reg_THREAD)
/* No longer in Lisp. */
- stw reg_CSP,THREAD_FOREIGN_FUNCTION_CALL_ACTIVE_OFFSET(reg_L2)
+ stw reg_CSP,THREAD_FOREIGN_FUNCTION_CALL_ACTIVE_OFFSET(reg_THREAD)
#else
/* Store Lisp state */
clrrwi reg_NFP,reg_ALLOC,3
#if defined(LISP_FEATURE_SB_THREAD)
/* No longer in foreign function call. */
- stw reg_ZERO,THREAD_FOREIGN_FUNCTION_CALL_ACTIVE_OFFSET(reg_L2)
+ stw reg_ZERO,THREAD_FOREIGN_FUNCTION_CALL_ACTIVE_OFFSET(reg_THREAD)
/* The binding stack pointer isn't preserved by C. */
- lwz reg_BSP,THREAD_BINDING_STACK_POINTER_OFFSET(reg_L2)
+ lwz reg_BSP,THREAD_BINDING_STACK_POINTER_OFFSET(reg_THREAD)
#else
/* No long in foreign function call. */
store(reg_ZERO,reg_NL2,CSYMBOL(foreign_function_call_active))
#define reg_A3 REG(27) /* Last of (only) 4 arg regs */
#define reg_L0 REG(28) /* Tagged temp regs */
#define reg_L1 REG(29)
+#ifdef LISP_FEATURE_SB_THREAD
+#define reg_THREAD REG(30) /* TLS block pointer */
+#else
#define reg_L2 REG(30) /* Last lisp temp reg */
+#endif
#define reg_LIP REG(31) /* Lisp Interior Pointer, e.g., locative */
+#ifdef LISP_FEATURE_SB_THREAD
+#define REG30_NAME "THREAD"
+#else
+#define REG30_NAME "L2"
+#endif
+
#define REGNAMES \
"ZERO", "NSP", "???", "NL0", \
"NL1", "NL2", "NL3P", "NL4", \
"CSP", "ALLOC", "NULL", "CODE", \
"CNAME", "LEXENV", "OCFP", "LRA", \
"A0", "A1", "A2", "A3", \
- "L0", "L1", "L2", "LIP"
+ "L0", "L1", REG30_NAME, "LIP"
#define BOXED_REGISTERS { \
reg_FDEFN, reg_CODE, reg_CNAME, reg_LEXENV, reg_OCFP, reg_LRA, \
reg_A0, reg_A1, reg_A2, reg_A3, \
- reg_L0, reg_L1, reg_L2 \
+ reg_L0, reg_L1, REG(30) \
}