4 #; - function with a space on the stack
5 #; allocated for local variables
7 .type func_locvars,@function
11 #; alocate space for local vars
13 .cfi_adjust_cfa_offset 0x1234
18 #; release space of local vars and return
20 .cfi_adjust_cfa_offset -0x1234
25 #; - functions that begins with standard
26 #; prologue: "pushq %rbp; movq %rsp,%rbp"
28 .type func_prologue,@function
32 #; prologue, CFI is valid after
35 .cfi_def_cfa_offset 16
38 .cfi_def_cfa_register %rbp
44 #; epilogue with valid CFI
45 #; (we're better than gcc :-)
52 #; - function that moves frame pointer to
53 #; another register (r12) and then allocates
54 #; a space for local variables
56 .type func_otherreg,@function
60 #; save frame pointer to r8
62 .cfi_def_cfa_register r8
64 #; alocate space for local vars
65 #; (no .cfi_{def,adjust}_cfa_offset here,
66 #; because CFA is computed from r8!)
73 #; restore frame pointer from r8
75 .cfi_def_cfa_register rsp
85 #; only function body that doesn't
86 #; touch the stack at all.
94 #; - standard entry point
96 .type _start,@function
107 #; func_alldirectives
108 #; - test for all .cfi directives.
109 #; This function is never called and the CFI info doesn't make sense.
111 .type func_alldirectives,@function
113 .cfi_startproc simple
116 .cfi_def_cfa_offset 16
118 .cfi_def_cfa_register r8
120 .cfi_adjust_cfa_offset 0x1234
122 .cfi_offset %rsi, 0x10
124 .cfi_register %r8, %r9
138 #; func_all_registers
139 #; - test for all .cfi register numbers.
140 #; This function is never called and the CFI info doesn't make sense.
142 .type func_all_registers,@function
144 .cfi_startproc simple
146 .cfi_undefined rip ; nop
147 .cfi_undefined rax ; nop
148 .cfi_undefined rcx ; nop
149 .cfi_undefined rdx ; nop
150 .cfi_undefined rbx ; nop
151 .cfi_undefined rsp ; nop
152 .cfi_undefined rbp ; nop
153 .cfi_undefined rsi ; nop
154 .cfi_undefined rdi ; nop
155 .cfi_undefined r8 ; nop
156 .cfi_undefined r9 ; nop
157 .cfi_undefined r10 ; nop
158 .cfi_undefined r11 ; nop
159 .cfi_undefined r12 ; nop
160 .cfi_undefined r13 ; nop
161 .cfi_undefined r14 ; nop
162 .cfi_undefined r15 ; nop
163 .cfi_undefined rflags ; nop
165 .cfi_undefined es ; nop
166 .cfi_undefined cs ; nop
167 .cfi_undefined ds ; nop
168 .cfi_undefined ss ; nop
169 .cfi_undefined fs ; nop
170 .cfi_undefined gs ; nop
171 .cfi_undefined tr ; nop
172 .cfi_undefined ldtr ; nop
173 .cfi_undefined fs.base ; nop
174 .cfi_undefined gs.base ; nop
176 .cfi_undefined mxcsr ; nop
177 .cfi_undefined xmm0 ; nop
178 .cfi_undefined xmm1 ; nop
179 .cfi_undefined xmm2 ; nop
180 .cfi_undefined xmm3 ; nop
181 .cfi_undefined xmm4 ; nop
182 .cfi_undefined xmm5 ; nop
183 .cfi_undefined xmm6 ; nop
184 .cfi_undefined xmm7 ; nop
185 .cfi_undefined xmm8 ; nop
186 .cfi_undefined xmm9 ; nop
187 .cfi_undefined xmm10 ; nop
188 .cfi_undefined xmm11 ; nop
189 .cfi_undefined xmm12 ; nop
190 .cfi_undefined xmm13 ; nop
191 .cfi_undefined xmm14 ; nop
192 .cfi_undefined xmm15 ; nop
194 .cfi_undefined fcw ; nop
195 .cfi_undefined fsw ; nop
196 .cfi_undefined st ; nop
197 .cfi_undefined st(1) ; nop
198 .cfi_undefined st(2) ; nop
199 .cfi_undefined st(3) ; nop
200 .cfi_undefined st(4) ; nop
201 .cfi_undefined st(5) ; nop
202 .cfi_undefined st(6) ; nop
203 .cfi_undefined st(7) ; nop
205 .cfi_undefined mm0 ; nop
206 .cfi_undefined mm1 ; nop
207 .cfi_undefined mm2 ; nop
208 .cfi_undefined mm3 ; nop
209 .cfi_undefined mm4 ; nop
210 .cfi_undefined mm5 ; nop
211 .cfi_undefined mm6 ; nop
212 .cfi_undefined mm7 ; nop