Last change
on this file since 321 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:
612 bytes
|
Rev | Line | |
---|
[279] | 1 | /* ---------------------------------------------- */
|
---|
| 2 | /* alloca86.S */
|
---|
| 3 |
|
---|
| 4 | .globl alloca
|
---|
| 5 |
|
---|
| 6 | alloca:
|
---|
| 7 | pop %edx
|
---|
| 8 | pop %eax
|
---|
| 9 | add $3,%eax
|
---|
| 10 | and $-4,%eax
|
---|
| 11 | jz p3
|
---|
| 12 |
|
---|
| 13 | #ifdef TCC_TARGET_PE
|
---|
| 14 | p1:
|
---|
| 15 | cmp $4096,%eax
|
---|
| 16 | jle p2
|
---|
| 17 | sub $4096,%esp
|
---|
| 18 | sub $4096,%eax
|
---|
| 19 | test %eax,(%esp)
|
---|
| 20 | jmp p1
|
---|
| 21 | p2:
|
---|
| 22 | #endif
|
---|
| 23 |
|
---|
| 24 | sub %eax,%esp
|
---|
| 25 | mov %esp,%eax
|
---|
| 26 | p3:
|
---|
| 27 | push %edx
|
---|
| 28 | push %edx
|
---|
| 29 | ret
|
---|
| 30 |
|
---|
| 31 | /* mark stack as nonexecutable */
|
---|
| 32 | #if defined __ELF__ && defined __linux__
|
---|
| 33 | .section .note.GNU-stack,"",@progbits
|
---|
| 34 | #endif
|
---|
| 35 | /* ---------------------------------------------- */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.