[Alignment][NFC] Instructions::getLoadStoreAlignment
[llvm-complete.git] / test / tools / llvm-symbolizer / functions.s
blob93cca51a0c17d630cd6ae26a0157432aad022015
1 # REQUIRES: x86-registered-target
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
5 # RUN: llvm-symbolizer 0 --obj=%t.o | FileCheck %s --check-prefix=LINKAGE
6 # RUN: llvm-symbolizer 0 --functions --obj=%t.o | FileCheck %s --check-prefix=LINKAGE
7 # RUN: llvm-symbolizer 0 --functions=linkage --obj=%t.o | FileCheck %s --check-prefix=LINKAGE
8 # RUN: llvm-symbolizer 0 --functions=short --obj=%t.o | FileCheck %s --check-prefix=SHORT
9 # RUN: llvm-symbolizer 0 --functions=none --obj=%t.o | FileCheck %s --check-prefix=NONE
11 ## Characterise behaviour for no '=' sign. llvm-symbolizer treats the next option as an
12 ## input address, and just prints it.
13 # RUN: llvm-symbolizer 0 --functions none --obj=%t.o | FileCheck %s --check-prefixes=LINKAGE,ERR
15 # LINKAGE: {{^}}foo(int){{$}}
16 # LINKAGE-NEXT: functions.cpp:2:0
18 # SHORT: {{^}}foo{{$}}
19 # SHORT-NEXT: functions.cpp:2:0
21 # NONE-NOT: foo
22 # NONE: functions.cpp:2:0
24 # ERR: none
26 # The assembly below is a stripped down version of the output of:
27 # clang -S -g --target=x86_64-pc-linux
28 # for the following C++ source:
29 # void foo(int bar) {}
30 .type _Z3fooi,@function
31 _Z3fooi:
32 .Lfunc_begin0:
33 .file 1 "/llvm-symbolizer/Inputs" "functions.cpp"
34 .loc 1 2 0 # functions.cpp:2:0
35 nop
36 .loc 1 2 20 prologue_end # functions.cpp:2:20
37 .Lfunc_end0:
39 .section .debug_str,"MS",@progbits,1
40 .Linfo_string1:
41 .asciz "functions.cpp"
42 .Linfo_string2:
43 .asciz "/llvm-symbolizer/Inputs"
44 .Linfo_string3:
45 .asciz "_Z3fooi"
46 .Linfo_string4:
47 .asciz "foo"
49 .section .debug_abbrev,"",@progbits
50 .byte 1 # Abbreviation Code
51 .byte 17 # DW_TAG_compile_unit
52 .byte 1 # DW_CHILDREN_yes
53 .byte 3 # DW_AT_name
54 .byte 14 # DW_FORM_strp
55 .byte 16 # DW_AT_stmt_list
56 .byte 23 # DW_FORM_sec_offset
57 .byte 27 # DW_AT_comp_dir
58 .byte 14 # DW_FORM_strp
59 .byte 17 # DW_AT_low_pc
60 .byte 1 # DW_FORM_addr
61 .byte 18 # DW_AT_high_pc
62 .byte 6 # DW_FORM_data4
63 .byte 0 # EOM(1)
64 .byte 0 # EOM(2)
65 .byte 2 # Abbreviation Code
66 .byte 46 # DW_TAG_subprogram
67 .byte 0 # DW_CHILDREN_no
68 .byte 17 # DW_AT_low_pc
69 .byte 1 # DW_FORM_addr
70 .byte 18 # DW_AT_high_pc
71 .byte 6 # DW_FORM_data4
72 .byte 110 # DW_AT_linkage_name
73 .byte 14 # DW_FORM_strp
74 .byte 3 # DW_AT_name
75 .byte 14 # DW_FORM_strp
76 .byte 58 # DW_AT_decl_file
77 .byte 11 # DW_FORM_data1
78 .byte 59 # DW_AT_decl_line
79 .byte 11 # DW_FORM_data1
80 .byte 0 # EOM(1)
81 .byte 0 # EOM(2)
82 .byte 0 # EOM(3)
84 .section .debug_info,"",@progbits
85 .Lcu_begin0:
86 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
87 .Ldebug_info_start0:
88 .short 4 # DWARF version number
89 .long .debug_abbrev # Offset Into Abbrev. Section
90 .byte 8 # Address Size (in bytes)
91 .byte 1 # Abbrev [1] 0xb:0x4f DW_TAG_compile_unit
92 .long .Linfo_string1 # DW_AT_name
93 .long .Lline_table_start0 # DW_AT_stmt_list
94 .long .Linfo_string2 # DW_AT_comp_dir
95 .quad .Lfunc_begin0 # DW_AT_low_pc
96 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
97 .byte 2 # Abbrev [2] 0x2a:0x28 DW_TAG_subprogram
98 .quad .Lfunc_begin0 # DW_AT_low_pc
99 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
100 .long .Linfo_string3 # DW_AT_linkage_name
101 .long .Linfo_string4 # DW_AT_name
102 .byte 1 # DW_AT_decl_file
103 .byte 2 # DW_AT_decl_line
104 .byte 0 # End Of Children Mark
105 .byte 0 # End Of Children Mark
106 .Ldebug_info_end0:
108 .section .debug_line,"",@progbits
109 .Lline_table_start0: