2007-11-23 08:03:03 +08:00
|
|
|
/* ---------------------------------------------- */
|
|
|
|
/* alloca86b.S */
|
|
|
|
|
2009-04-18 20:31:35 +08:00
|
|
|
#include "../config.h"
|
2008-01-17 04:16:35 +08:00
|
|
|
|
2007-12-14 03:07:19 +08:00
|
|
|
.globl __bound__alloca
|
2007-11-23 08:03:03 +08:00
|
|
|
|
2007-12-14 03:07:19 +08:00
|
|
|
__bound__alloca:
|
2007-11-23 08:03:03 +08:00
|
|
|
pop %edx
|
|
|
|
pop %eax
|
|
|
|
mov %eax, %ecx
|
|
|
|
add $3,%eax
|
|
|
|
and $-4,%eax
|
|
|
|
jz p6
|
|
|
|
|
2008-01-17 04:16:35 +08:00
|
|
|
#ifdef TCC_TARGET_PE
|
2007-11-23 08:03:03 +08:00
|
|
|
p4:
|
|
|
|
cmp $4096,%eax
|
|
|
|
jle p5
|
|
|
|
sub $4096,%esp
|
|
|
|
sub $4096,%eax
|
|
|
|
test %eax,(%esp)
|
|
|
|
jmp p4
|
|
|
|
|
|
|
|
p5:
|
2008-01-17 04:16:35 +08:00
|
|
|
#endif
|
|
|
|
|
2007-11-23 08:03:03 +08:00
|
|
|
sub %eax,%esp
|
|
|
|
mov %esp,%eax
|
|
|
|
|
|
|
|
push %edx
|
|
|
|
push %eax
|
|
|
|
push %ecx
|
|
|
|
push %eax
|
|
|
|
call __bound_new_region
|
|
|
|
add $8, %esp
|
|
|
|
pop %eax
|
|
|
|
pop %edx
|
|
|
|
|
|
|
|
p6:
|
|
|
|
push %edx
|
|
|
|
push %edx
|
|
|
|
ret
|
|
|
|
|
|
|
|
/* ---------------------------------------------- */
|