• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1    .text
2    .globl func
3    .def func; .scl 2; .type 32; .endef
4    .seh_proc func
5func:
6    .seh_pushframe @code
7    subq $24, %rsp
8    .seh_stackalloc 24
9    movq %rsi, 16(%rsp)
10    .seh_savereg %rsi, 16
11    movups %xmm8, (%rsp)
12    .seh_savexmm %xmm8, 0
13    pushq %rbx
14    .seh_pushreg 3
15    mov %rsp, %rbx
16    .seh_setframe 3, 0
17    .seh_endprologue
18    .seh_handler __C_specific_handler, @except
19    .seh_handlerdata
20    .long 0
21    .text
22    .seh_startchained
23    .seh_endprologue
24    .seh_endchained
25    lea (%rbx), %rsp
26    pop %rbx
27    addq $24, %rsp
28    ret
29    .seh_endproc
30
31// Test emission of small functions.
32    .globl smallFunc
33    .def smallFunc; .scl 2; .type 32; .endef
34    .seh_proc smallFunc
35smallFunc:
36    ret
37    .seh_endproc
38
39// Function with big stack allocation.
40    .globl allocFunc
41    .def allocFunc; .scl 2; .type 32; .endef
42    .seh_proc allocFunc
43allocFunc:
44    .seh_pushframe @code
45    subq $65520, %rsp
46    .seh_stackalloc 65520
47    sub $8454128, %rsp
48    .seh_stackalloc 8454128
49    .seh_endprologue
50    add $8454128, %rsp
51    addq $65520, %rsp
52    ret
53    .seh_endproc
54