- pushl %eax # Save eax
- pushl %ecx # Save ecx
- pushl %edx # Save edx
- /* Calculate the size for the allocation. */
- subl GNAME(current_region_free_pointer),%esi
- pushl %esi # Push the size
- call GNAME(alloc)
- addl $4,%esp # pop the size arg.
- movl %eax,%esi # setup the destination.
- popl %edx # Restore edx.
- popl %ecx # Restore ecx.
- popl %eax # Restore eax.
- addl $6,(%esp) # Adjust the return address to skip the next inst.
- ret
- .size GNAME(alloc_overflow_esi),.-GNAME(alloc_overflow_esi)
-
-/* This routine handles an overflow with edi=crfp+size. So the
- * size=edi-crfp. */
- .align align_4byte
- .globl GNAME(alloc_overflow_edi)
- .type GNAME(alloc_overflow_edi),@function
+ pushl %eax # Save eax
+ pushl %ecx # Save ecx
+ pushl %edx # Save edx
+ /* Calculate the size for the allocation. */
+ subl START_REGION,%esi
+ pushl %esi # Push the size
+ call GNAME(alloc)
+ addl $4,%esp # pop the size arg.
+ movl %eax,%esi # setup the destination.
+ popl %edx # Restore edx.
+ popl %ecx # Restore ecx.
+ popl %eax # Restore eax.
+ addl DISPLACEMENT,(%esp) # Adjust the return address to skip the next inst.
+ ret
+ .size GNAME(alloc_overflow_esi),.-GNAME(alloc_overflow_esi)
+
+ .align align_4byte
+ .globl GNAME(alloc_overflow_edi)
+ .type GNAME(alloc_overflow_edi),@function