Better handling of UCNs in strings
[tinycc.git] / lib / alloca86-bt.S
blobef674adc93df33b9dfe62106a07fec7f9ba28202
1 /* ---------------------------------------------- */
2 /* alloca86-bt.S */
4 #ifdef __leading_underscore
5 # define _(s) _##s
6 #else
7 # define _(s) s
8 #endif
10 .globl _(__bound_alloca)
11 _(__bound_alloca):
12     pop     %edx
13     pop     %eax
14     mov     %eax, %ecx
15     add     $3+1,%eax
16     and     $-4,%eax
17     jz      p6
19 #ifdef _WIN32
20 p4:
21     cmp     $4096,%eax
22     jbe     p5
23     test    %eax,-4096(%esp)
24     sub     $4096,%esp
25     sub     $4096,%eax
26     jmp p4
28 p5:
29 #endif
31     sub     %eax,%esp
32     mov     %esp,%eax
34     push    %edx
35     push    %eax
36     push    %ecx
37     push    %eax
38     call    _(__bound_new_region)
39     add     $8, %esp
40     pop     %eax
41     pop     %edx
43 p6:
44     push    %edx
45     push    %edx
46     ret
48 /* mark stack as nonexecutable */
49 #if defined __ELF__ && defined __linux__
50     .section    .note.GNU-stack,"",@progbits
51 #endif
52 /* ---------------------------------------------- */