Last change
on this file since 328 was 279, checked in by coas-nagasima, 7 years ago |
ファイルを追加、更新。
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Id
-
Property svn:mime-type
set to
text/plain
|
File size:
711 bytes
|
Line | |
---|
1 | /* ---------------------------------------------- */
|
---|
2 | /* alloca86_64.S */
|
---|
3 |
|
---|
4 | .globl alloca
|
---|
5 |
|
---|
6 | alloca:
|
---|
7 | pop %rdx
|
---|
8 | #ifdef TCC_TARGET_PE
|
---|
9 | mov %rcx,%rax
|
---|
10 | #else
|
---|
11 | mov %rdi,%rax
|
---|
12 | #endif
|
---|
13 | add $15,%rax
|
---|
14 | and $-16,%rax
|
---|
15 | jz p3
|
---|
16 |
|
---|
17 | #ifdef TCC_TARGET_PE
|
---|
18 | p1:
|
---|
19 | cmp $4096,%rax
|
---|
20 | jle p2
|
---|
21 | sub $4096,%rsp
|
---|
22 | sub $4096,%rax
|
---|
23 | test %rax,(%rsp)
|
---|
24 | jmp p1
|
---|
25 | p2:
|
---|
26 | #endif
|
---|
27 |
|
---|
28 | sub %rax,%rsp
|
---|
29 | mov %rsp,%rax
|
---|
30 | #ifdef TCC_TARGET_PE
|
---|
31 | add $32,%rax
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | p3:
|
---|
35 | push %rdx
|
---|
36 | ret
|
---|
37 |
|
---|
38 | /* mark stack as nonexecutable */
|
---|
39 | #if defined __ELF__ && defined __linux__
|
---|
40 | .section .note.GNU-stack,"",@progbits
|
---|
41 | #endif
|
---|
42 | /* ---------------------------------------------- */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.