+ /* NL0 - function, NL1 - frame pointer, NL2 - nargs. */
+#if defined(LISP_FEATURE_SB_THREAD)
+ /* We need to obtain a pointer to our TLS block before we do
+ * anything else. For this, we call pthread_getspecific().
+ * We've preserved all of the callee-saves registers, so we
+ * can use them to stash our arguments temporarily while we
+ * make the call. */
+ mr reg_A0, reg_NL0
+ mr reg_A1, reg_NL1
+ mr reg_A2, reg_NL2
+
+ /* Call out to obtain our TLS block. */
+ load(reg_NL0,CSYMBOL(specials))
+ /* This won't work on darwin: wrong fixup style. And is it
+ * supposed to be lis/ori or lis/addi? Or does it differ
+ * between darwin and everything else again? */
+ lis reg_CFUNC,CSYMBOL(pthread_getspecific)@h
+ ori reg_CFUNC,reg_CFUNC,CSYMBOL(pthread_getspecific)@l
+ mtctr reg_CFUNC
+ bctrl
+ mr reg_THREAD, reg_NL0
+
+ /* Restore our original parameters. */
+ mr reg_NL2, reg_A2
+ mr reg_NL1, reg_A1
+ mr reg_NL0, reg_A0
+#endif