1# RUN: llvm-mc -triple=i686-windows-msvc %s -filetype=obj -o %t.obj 2# RUN: llvm-readobj --codeview %t.obj | FileCheck %s 3 4# The .cv_string directive mainly exists as a convenience for manually writing 5# FPO data in assembler. Test that we can write FPO data using this directive, 6# and that the string comes out in the dumper. 7 8# void g(int); 9# void f(int x) { 10# g(x+1); 11# } 12 13# CHECK: FrameFunc [ 14# CHECK-NEXT: abc = 15# CHECK-NEXT: def = 16# CHECK-NEXT: ghi = 17# CHECK-NEXT: ] 18 19 .text 20 .def @feat.00; 21 .scl 3; 22 .type 0; 23 .endef 24 .globl @feat.00 25.set @feat.00, 1 26 .def _f; 27 .scl 2; 28 .type 32; 29 .endef 30 .globl _f # -- Begin function f 31 .p2align 4, 0x90 32_f: # @f 33Lfunc_begin0: 34# %bb.0: # %entry 35 pushl %ebp 36 movl %esp, %ebp 37 subl $8, %esp 38 movl 8(%ebp), %eax 39 movl 8(%ebp), %ecx 40 addl $1, %ecx 41 movl %ecx, (%esp) 42 movl %eax, -4(%ebp) # 4-byte Spill 43 calll _g 44 addl $8, %esp 45 popl %ebp 46 retl 47Lfunc_end0: 48 # -- End function 49 .section .debug$S,"dr" 50 .p2align 2 51 .long 4 # Debug section magic 52 53 # Open coded frame data 54 .long 245 55 .long Lfoo_fpo_end-Lfoo_fpo_begin # Subsection size 56Lfoo_fpo_begin: 57 .long _f 58 .long 0 59 .long Lfunc_end0-Lfunc_begin0 60 .long 24 # LocalSize 61 .long 0 # ParamSize 62 .long 0 # MaxStackSize 63 .cv_string "abc = def = ghi = " 64 .short 0 # PrologSize 65 .short 0 # SavedRegSize 66 .long 0x4 # Flags 67Lfoo_fpo_end: 68 .p2align 2 69 .cv_stringtable # String table 70