]> gcc.gnu.org Git - gcc.git/blame - gcc/config/rs6000/ntstack.asm
Daily bump.
[gcc.git] / gcc / config / rs6000 / ntstack.asm
CommitLineData
979721f8
MM
1# Allocate stack for NT, inserting stack probes every 4k pages
2
3 .file "ntstack.asm"
4
5# Setup MS Structured-Exception-Handling
6 .pdata
7 .align 2
8 .ualong ..__allocate_stack,__allocate_stack.e,0,0,__allocate_stack.b
9
10# Switch to the relocation section
11 .reldata
12 .globl __allocate_stack
13 .globl ..__allocate_stack
14__allocate_stack:
15 .ualong ..__allocate_stack,.toc
16
17 .text
18 .align 2
19..__allocate_stack:
20 .function ..__allocate_stack
21__allocate_stack.b:
d0bac83e 22 addi 3,3,15 # round up to 16 byte alignment
979721f8 23 lwz 0,0(1) # old stack link
d0bac83e 24 rlwinm 3,3,0,0,28
979721f8
MM
25 srawi. 4,3,12 # get # of pages to check
26 neg 3,3 # negate so we can use stwux
27 bgt- 0,.Lcheck
28 stwux 0,1,3 # small request, just decrement and return
29 blr
30
31.Lcheck:
32 mtctr 4 # number of pages to check
33 mr 5,1 # tmp pointer
34.Lloop:
35 lwzu 6,-4096(5) # touch the page
36 bdnz+ .Lloop # and loop back
37
38 stwux 0,1,3 # update stack pointer
39 blr
40
41__allocate_stack.e:
42FE_MOT_RESVD..__allocate_stack:
This page took 0.37764 seconds and 5 git commands to generate.