repo.or.cz
/
tinycc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Avoid crash with "Avoid a crash with weak symbols for "make test""
[tinycc.git]
/
lib
/
alloca86_64.S
blob
13c4672eb05c3a9f2a0e35b292c1fc4e6fea1380
1
/* ---------------------------------------------- */
2
/* alloca86_64.S */
3
4
#include "../config.h"
5
6
.globl alloca
7
8
alloca:
9
pop %rdx
10
#ifdef TCC_TARGET_PE
11
mov %rcx,%rax
12
#else
13
mov %rdi,%rax
14
#endif
15
add $15,%rax
16
and $-16,%rax
17
jz p3
18
19
#ifdef TCC_TARGET_PE
20
p1:
21
cmp $4096,%rax
22
jle p2
23
sub $4096,%rsp
24
sub $4096,%rax
25
test %rax,(%rsp)
26
jmp p1
27
p2:
28
#endif
29
30
sub %rax,%rsp
31
mov %rsp,%rax
32
#ifdef TCC_TARGET_PE
33
add $32,%rax
34
#endif
35
36
p3:
37
push %rdx
38
ret
39
40
/* ---------------------------------------------- */