win32: allow user segments as writable & executable
[tinycc.git] / alloca86-bt.S
blob3fa8a53e5624d0f8f8d174305df50ec37bf78309
1 /* ---------------------------------------------- */
2 /* alloca86b.S */
4 #include "config.h"
6 .globl __bound__alloca
8 __bound__alloca:
9     pop     %edx
10     pop     %eax
11     mov     %eax, %ecx
12     add     $3,%eax
13     and     $-4,%eax
14     jz      p6
16 #ifdef TCC_TARGET_PE
17 p4:
18     cmp     $4096,%eax
19     jle     p5
20     sub     $4096,%esp
21     sub     $4096,%eax
22     test    %eax,(%esp)
23     jmp p4
25 p5:
26 #endif
28     sub     %eax,%esp
29     mov     %esp,%eax
31     push    %edx
32     push    %eax
33     push    %ecx
34     push    %eax
35     call   __bound_new_region
36     add    $8, %esp
37     pop     %eax
38     pop     %edx
40 p6:
41     push    %edx
42     push    %edx
43     ret
45 /* ---------------------------------------------- */