win32: long double as distinct C-type
[tinycc.git] / lib / alloca86_64.S
bloba4aa173c40db4184d72fddf299cda6a090e9d4d5
1 /* ---------------------------------------------- */
2 /* alloca86_64.S */
4 .globl alloca
6 alloca:
7     pop     %rdx
8 #ifdef _WIN32
9     mov     %rcx,%rax
10 #else
11     mov     %rdi,%rax
12 #endif
13     add     $15,%rax
14     and     $-16,%rax
15     jz      p3
17 #ifdef _WIN32
18 p1:
19     cmp     $4096,%rax
20     jbe     p2
21     test    %rax,-4096(%rsp)
22     sub     $4096,%rsp
23     sub     $4096,%rax
24     jmp p1
25 p2:
26 #endif
27     sub     %rax,%rsp
28     mov     %rsp,%rax
29 p3:
30     push    %rdx
31     ret
33 /* ---------------------------------------------- */