#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.