* |XXXXXXXX| e4e
* TLS ends here> ,- |XXXXXXXX| e4f = TEB_STATIC_TLS_SLOTS_OFFSET+63
* / z z
- * | ----------
- * |
- * | big blob of SBCL-specific thread-local data
- * | |----------------------------------------|
+ * | ---------- "os_address" ----.
+ * | |
+ * | big blob of SBCL-specific thread-local data |
+ * | |----------------------------------------| <--'
* | | CONTROL, BINDING, ALIEN STACK |
* | z z
* ================== | |----------------------------------------|
#ifdef LISP_FEATURE_WIN32
/* Establish an SEH frame. */
#ifdef LISP_FEATURE_SB_THREAD
- /* FIXME: need to save BSP here. */
-#error "need to save BSP here, but don't know how yet."
+ /* Save binding stack pointer */
+ subl $4, %esp
+ pushl %eax
+ movl SBCL_THREAD_BASE_EA, %eax
+ movl THREAD_BINDING_STACK_POINTER_OFFSET(%eax), %eax
+ movl %eax, 4(%esp)
+ popl %eax
#else
pushl BINDING_STACK_POINTER + SYMBOL_VALUE_OFFSET
#endif
#ifdef LISP_FEATURE_WIN32
/* Remove our SEH frame. */
+ mov %fs:0,%esp
popl %fs:0
add $8, %esp
#endif
#define START_REGION GNAME(boxed_region)
#endif
-#define ALLOC_OVERFLOW(size) \
- /* Calculate the size for the allocation. */ \
- subl START_REGION,size; \
- ALLOC(size)
+#if defined(LISP_FEATURE_SB_THREAD) && defined(LISP_FEATURE_WIN32)
+#define ALLOC_OVERFLOW(size,scratch) \
+ movl SBCL_THREAD_BASE_EA, scratch; \
+ /* Calculate the size for the allocation. */ \
+ subl THREAD_ALLOC_REGION_OFFSET(scratch),size; \
+ ALLOC(size)
+#else
+#define ALLOC_OVERFLOW(size,scratch) \
+ /* Calculate the size for the allocation. */ \
+ subl START_REGION,size; \
+ ALLOC(size)
+#endif
/* This routine handles an overflow with eax=crfp+size. So the
size=eax-crfp. */
GNAME(alloc_overflow_eax):
pushl %ecx # Save ecx
pushl %edx # Save edx
- ALLOC_OVERFLOW(%eax)
+ ALLOC_OVERFLOW(%eax,%edx)
popl %edx # Restore edx.
popl %ecx # Restore ecx.
ret
GNAME(alloc_overflow_ecx):
pushl %eax # Save eax
pushl %edx # Save edx
- ALLOC_OVERFLOW(%ecx)
+ ALLOC_OVERFLOW(%ecx,%edx)
movl %eax,%ecx # setup the destination.
popl %edx # Restore edx.
popl %eax # Restore eax.
GNAME(alloc_overflow_edx):
pushl %eax # Save eax
pushl %ecx # Save ecx
- ALLOC_OVERFLOW(%edx)
+ ALLOC_OVERFLOW(%edx,%ecx)
movl %eax,%edx # setup the destination.
popl %ecx # Restore ecx.
popl %eax # Restore eax.
pushl %eax # Save eax
pushl %ecx # Save ecx
pushl %edx # Save edx
- ALLOC_OVERFLOW(%ebx)
+ ALLOC_OVERFLOW(%ebx,%edx)
movl %eax,%ebx # setup the destination.
popl %edx # Restore edx.
popl %ecx # Restore ecx.
pushl %eax # Save eax
pushl %ecx # Save ecx
pushl %edx # Save edx
- ALLOC_OVERFLOW(%esi)
+ ALLOC_OVERFLOW(%esi,%edx)
movl %eax,%esi # setup the destination.
popl %edx # Restore edx.
popl %ecx # Restore ecx.
pushl %eax # Save eax
pushl %ecx # Save ecx
pushl %edx # Save edx
- ALLOC_OVERFLOW(%edi)
+ ALLOC_OVERFLOW(%edi,%edx)
movl %eax,%edi # setup the destination.
popl %edx # Restore edx.
popl %ecx # Restore ecx.
* to fast_bzero_detect if OS supports SSE. */
.long GNAME(fast_bzero_base)
\f
- .globl GNAME(gc_safepoint_page)
- .data
- .align align_page
-GNAME(gc_safepoint_page):
- .fill BACKEND_PAGE_BYTES,1,0
-\f
.text
.align align_16byte,0x90
.globl GNAME(fast_bzero)