make SILENT=yes
[tinycc.git] / lib / alloca86_64-bt.S
blobe1bac5f483a882be1f638508e6060c423a6903b4
1 /* ---------------------------------------------- */
2 /* alloca86_64.S */
4 .globl __bound_alloca
5 __bound_alloca:
7 #ifdef _WIN32
8     inc %rcx            # add one extra to separate regions
9     jmp alloca
10 .globl __bound_alloca_nr
11 __bound_alloca_nr:
12     dec     %rcx
13     push    %rax
14     mov     %rcx,%rdx
15     mov     %rax,%rcx
16     sub     $32,%rsp
17     call    __bound_new_region
18     add     $32,%rsp
19     pop     %rax
20     ret
21 #else
22     pop     %rdx
23     mov     %rdi,%rax
24     mov     %rax,%rsi   # size, a second parm to the __bound_new_region
26     add     $15 + 1,%rax  # add one extra to separate regions
27     and     $-16,%rax
28     jz      p3
31     sub     %rax,%rsp
32     mov     %rsp,%rdi   # pointer, a first parm to the __bound_new_region
33     mov     %rsp,%rax
35     push    %rdx
36     push    %rax
37     call   __bound_new_region
38     pop     %rax
39     pop     %rdx
41 p3:
42     push    %rdx
43     ret
44 #endif
46 /* ---------------------------------------------- */