X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fruntime%2Fppc-assem.S;h=51b6b32434bf271c9abf15ae8eec735ff90260ce;hb=2056118835600a7c4e372c796568ddada5824cf6;hp=32ec9123af3bd5c5db5bfe1726dfe418b0199c27;hpb=16fa00e83bc553a6436f0eac7ca9d8455f7763fa;p=sbcl.git diff --git a/src/runtime/ppc-assem.S b/src/runtime/ppc-assem.S index 32ec912..51b6b32 100644 --- a/src/runtime/ppc-assem.S +++ b/src/runtime/ppc-assem.S @@ -279,7 +279,26 @@ x: mtlr 0 ; \ #endif - + +/* gas can't parse nnnnLU; redefine */ +#if BACKEND_PAGE_BYTES == 65536 +# undef BACKEND_PAGE_BYTES +# define BACKEND_PAGE_BYTES 65536 +#elif BACKEND_PAGE_BYTES == 4096 +# undef BACKEND_PAGE_BYTES +# define BACKEND_PAGE_BYTES 4096 +#else +# error BACKEND_PAGE_BYTES mismatch +#endif + +#ifdef LISP_FEATURE_SB_SAFEPOINT +/* OAOOM because we don't have the C headers here. */ +# define THREAD_CSP_PAGE_SIZE 4096 + +/* the CSP page sits right before the thread */ +# define THREAD_SAVED_CSP_OFFSET (-THREAD_CSP_PAGE_SIZE) +#endif + .text /* @@ -499,6 +518,11 @@ lra: andi. reg_NL3, reg_ALLOC, flag_PseudoAtomicInterrupted twnei reg_NL3, 0 +#ifdef LISP_FEATURE_SB_SAFEPOINT + /* OK to run GC without stopping this thread from this point on. */ + stw reg_CSP,THREAD_SAVED_CSP_OFFSET(reg_THREAD) +#endif + mr reg_NL3,reg_NARGS #ifdef LISP_FEATURE_DARWIN @@ -541,6 +565,11 @@ lra: #endif li reg_LIP,0 +# ifdef LISP_FEATURE_SB_SAFEPOINT + /* No longer OK to run GC except at safepoints. */ + stw reg_ZERO,THREAD_SAVED_CSP_OFFSET(reg_THREAD) +# endif + /* Atomic ... */ li reg_ALLOC,flag_PseudoAtomic