Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr/gitroot/simgrid/simgrid
[simgrid.git] / tools / stack-cleaner / README
1 Provides stack-cleaning compilers for x86_64:
2
3  * as
4  * cc
5  * c++
6  * fortran
7
8 Each of them modify the generated/given X86_64 assembly by prepending stack-cleanup code to each function:
9
10         movq $0x7ffff7ff8000, %r11
11         cmpq %r11, %rsp
12         jbe .Lstack_cleaner_done0
13         movq $QSIZE, %r11
14 .Lstack_cleaner_loop0:
15         movq $0, OFFSET(%rsp,%r11,8)
16         subq $1, %r11
17         jne  .Lstack_cleaner_loop0:
18 .Lstack_cleaner_done0:
19
20 The modification of the assembly is done by the clean-stack-filter program.
21
22 If the underlying compiler is clang, it might be necessary to add the -no-integrated-as flag in order to force the 
23 usage of an external assembler.