brintos

brintos / llvm-project-archived public Read only

0
0
Text · 20.1 KiB · bbcba0f Raw
477 lines · plain
1# clang++ -g -gdwarf-5 -gsplit-dwarf=split -emit-llvm -S  main.cpp2# llc -O0 -mtriple=x86_64-unknown-linux-gnu main.ll3# void use(int * x, int * y) {4# *x += 4;5# *y -= 2;6# }7#8# int helper(int z_, int d_);9# int x = 0;10# int y = 1;11# int  main(int argc, char *argv[]) {12#    x = argc;13#    y = argc + 3;14#    use(&x, &y);15#    return helper(x, y);16# }17 18	.text19	.file	"main.cpp"20	.file	0 "." "main.cpp" md5 0x1f627913a0daee879e00a3a51726f0ef21	.globl	_Z3usePiS_                      # -- Begin function _Z3usePiS_22	.p2align	4, 0x9023	.type	_Z3usePiS_,@function24_Z3usePiS_:                             # @_Z3usePiS_25.Lfunc_begin0:26	.loc	0 1 0                           # main.cpp:1:027	.cfi_startproc28# %bb.0:                                # %entry29	pushq	%rbp30	.cfi_def_cfa_offset 1631	.cfi_offset %rbp, -1632	movq	%rsp, %rbp33	.cfi_def_cfa_register %rbp34	movq	%rdi, -8(%rbp)35	movq	%rsi, -16(%rbp)36.Ltmp0:37	.loc	0 2 2 prologue_end              # main.cpp:2:238	movq	-8(%rbp), %rax39	.loc	0 2 4 is_stmt 0                 # main.cpp:2:440	movl	(%rax), %ecx41	addl	$4, %ecx42	movl	%ecx, (%rax)43	.loc	0 3 2 is_stmt 1                 # main.cpp:3:244	movq	-16(%rbp), %rax45	.loc	0 3 4 is_stmt 0                 # main.cpp:3:446	movl	(%rax), %ecx47	subl	$2, %ecx48	movl	%ecx, (%rax)49	.loc	0 4 1 is_stmt 1                 # main.cpp:4:150	popq	%rbp51	.cfi_def_cfa %rsp, 852	retq53.Ltmp1:54.Lfunc_end0:55	.size	_Z3usePiS_, .Lfunc_end0-_Z3usePiS_56	.cfi_endproc57                                        # -- End function58	.globl	main                            # -- Begin function main59	.p2align	4, 0x9060	.type	main,@function61main:                                   # @main62.Lfunc_begin1:63	.loc	0 9 0                           # main.cpp:9:064	.cfi_startproc65# %bb.0:                                # %entry66	pushq	%rbp67	.cfi_def_cfa_offset 1668	.cfi_offset %rbp, -1669	movq	%rsp, %rbp70	.cfi_def_cfa_register %rbp71	subq	$16, %rsp72	movl	$0, -4(%rbp)73	movl	%edi, -8(%rbp)74	movq	%rsi, -16(%rbp)75.Ltmp2:76	.loc	0 10 8 prologue_end             # main.cpp:10:877	movl	-8(%rbp), %eax78	.loc	0 10 6 is_stmt 0                # main.cpp:10:679	movl	%eax, x80	.loc	0 11 8 is_stmt 1                # main.cpp:11:881	movl	-8(%rbp), %eax82	.loc	0 11 13 is_stmt 0               # main.cpp:11:1383	addl	$3, %eax84	.loc	0 11 6                          # main.cpp:11:685	movl	%eax, y86	.loc	0 12 4 is_stmt 1                # main.cpp:12:487	movabsq	$x, %rdi88	movabsq	$y, %rsi89	callq	_Z3usePiS_90	.loc	0 13 18                         # main.cpp:13:1891	movl	x, %edi92	.loc	0 13 21 is_stmt 0               # main.cpp:13:2193	movl	y, %esi94	.loc	0 13 11                         # main.cpp:13:1195	callq	_Z6helperii96	.loc	0 13 4                          # main.cpp:13:497	addq	$16, %rsp98	popq	%rbp99	.cfi_def_cfa %rsp, 8100	retq101.Ltmp3:102.Lfunc_end1:103	.size	main, .Lfunc_end1-main104	.cfi_endproc105                                        # -- End function106	.type	x,@object                       # @x107	.bss108	.globl	x109	.p2align	2110x:111	.long	0                               # 0x0112	.size	x, 4113 114	.type	y,@object                       # @y115	.data116	.globl	y117	.p2align	2118y:119	.long	1                               # 0x1120	.size	y, 4121 122	.section	.debug_abbrev,"",@progbits123	.byte	1                               # Abbreviation Code124	.byte	74                              # DW_TAG_skeleton_unit125	.byte	0                               # DW_CHILDREN_no126	.byte	16                              # DW_AT_stmt_list127	.byte	23                              # DW_FORM_sec_offset128	.byte	114                             # DW_AT_str_offsets_base129	.byte	23                              # DW_FORM_sec_offset130	.byte	27                              # DW_AT_comp_dir131	.byte	37                              # DW_FORM_strx1132	.ascii	"\264B"                         # DW_AT_GNU_pubnames133	.byte	25                              # DW_FORM_flag_present134	.byte	118                             # DW_AT_dwo_name135	.byte	37                              # DW_FORM_strx1136	.byte	17                              # DW_AT_low_pc137	.byte	27                              # DW_FORM_addrx138	.byte	18                              # DW_AT_high_pc139	.byte	6                               # DW_FORM_data4140	.byte	115                             # DW_AT_addr_base141	.byte	23                              # DW_FORM_sec_offset142	.byte	0                               # EOM(1)143	.byte	0                               # EOM(2)144	.byte	0                               # EOM(3)145	.section	.debug_info,"",@progbits146.Lcu_begin0:147	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit148.Ldebug_info_start0:149	.short	5                               # DWARF version number150	.byte	4                               # DWARF Unit Type151	.byte	8                               # Address Size (in bytes)152	.long	.debug_abbrev                   # Offset Into Abbrev. Section153	.quad	2452897014735893912154	.byte	1                               # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit155	.long	.Lline_table_start0             # DW_AT_stmt_list156	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base157	.byte	0                               # DW_AT_comp_dir158                                        # DW_AT_GNU_pubnames159	.byte	1                               # DW_AT_dwo_name160	.byte	2                               # DW_AT_low_pc161	.long	.Lfunc_end1-.Lfunc_begin0       # DW_AT_high_pc162	.long	.Laddr_table_base0              # DW_AT_addr_base163.Ldebug_info_end0:164	.section	.debug_str_offsets,"",@progbits165	.long	12                              # Length of String Offsets Set166	.short	5167	.short	0168.Lstr_offsets_base0:169	.section	.debug_str,"MS",@progbits,1170.Lskel_string0:171	.asciz	"."                             # string offset=0172.Lskel_string1:173	.asciz	"main.dwo"                      # string offset=2174	.section	.debug_str_offsets,"",@progbits175	.long	.Lskel_string0176	.long	.Lskel_string1177	.section	.debug_str_offsets.dwo,"e",@progbits178	.long	52                              # Length of String Offsets Set179	.short	5180	.short	0181	.section	.debug_str.dwo,"eMS",@progbits,1182.Linfo_string0:183	.asciz	"x"                             # string offset=0184.Linfo_string1:185	.asciz	"int"                           # string offset=2186.Linfo_string2:187	.asciz	"y"                             # string offset=6188.Linfo_string3:189	.asciz	"_Z3usePiS_"                    # string offset=8190.Linfo_string4:191	.asciz	"use"                           # string offset=19192.Linfo_string5:193	.asciz	"main"                          # string offset=23194.Linfo_string6:195	.asciz	"argc"                          # string offset=28196.Linfo_string7:197	.asciz	"argv"                          # string offset=33198.Linfo_string8:199	.asciz	"char"                          # string offset=38200.Linfo_string9:201	.asciz	"clang version 15.0.0"          # string offset=43202.Linfo_string10:203	.asciz	"main.cpp"                      # string offset=64204.Linfo_string11:205	.asciz	"main.dwo"                      # string offset=73206	.section	.debug_str_offsets.dwo,"e",@progbits207	.long	0208	.long	2209	.long	6210	.long	8211	.long	19212	.long	23213	.long	28214	.long	33215	.long	38216	.long	43217	.long	64218	.long	73219	.section	.debug_info.dwo,"e",@progbits220	.long	.Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit221.Ldebug_info_dwo_start0:222	.short	5                               # DWARF version number223	.byte	5                               # DWARF Unit Type224	.byte	8                               # Address Size (in bytes)225	.long	0                               # Offset Into Abbrev. Section226	.quad	2452897014735893912227	.byte	1                               # Abbrev [1] 0x14:0x7d DW_TAG_compile_unit228	.byte	9                               # DW_AT_producer229	.short	33                              # DW_AT_language230	.byte	10                              # DW_AT_name231	.byte	11                              # DW_AT_dwo_name232	.byte	2                               # Abbrev [2] 0x1a:0xb DW_TAG_variable233	.byte	0                               # DW_AT_name234	.long	37                              # DW_AT_type235                                        # DW_AT_external236	.byte	0                               # DW_AT_decl_file237	.byte	7                               # DW_AT_decl_line238	.byte	2                               # DW_AT_location239	.byte	161240	.byte	0241	.byte	3                               # Abbrev [3] 0x25:0x4 DW_TAG_base_type242	.byte	1                               # DW_AT_name243	.byte	5                               # DW_AT_encoding244	.byte	4                               # DW_AT_byte_size245	.byte	2                               # Abbrev [2] 0x29:0xb DW_TAG_variable246	.byte	2                               # DW_AT_name247	.long	37                              # DW_AT_type248                                        # DW_AT_external249	.byte	0                               # DW_AT_decl_file250	.byte	8                               # DW_AT_decl_line251	.byte	2                               # DW_AT_location252	.byte	161253	.byte	1254	.byte	4                               # Abbrev [4] 0x34:0x23 DW_TAG_subprogram255	.byte	2                               # DW_AT_low_pc256	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc257	.byte	1                               # DW_AT_frame_base258	.byte	86259	.byte	3                               # DW_AT_linkage_name260	.byte	4                               # DW_AT_name261	.byte	0                               # DW_AT_decl_file262	.byte	1                               # DW_AT_decl_line263                                        # DW_AT_external264	.byte	5                               # Abbrev [5] 0x40:0xb DW_TAG_formal_parameter265	.byte	2                               # DW_AT_location266	.byte	145267	.byte	120268	.byte	0                               # DW_AT_name269	.byte	0                               # DW_AT_decl_file270	.byte	1                               # DW_AT_decl_line271	.long	125                             # DW_AT_type272	.byte	5                               # Abbrev [5] 0x4b:0xb DW_TAG_formal_parameter273	.byte	2                               # DW_AT_location274	.byte	145275	.byte	112276	.byte	2                               # DW_AT_name277	.byte	0                               # DW_AT_decl_file278	.byte	1                               # DW_AT_decl_line279	.long	125                             # DW_AT_type280	.byte	0                               # End Of Children Mark281	.byte	6                               # Abbrev [6] 0x57:0x26 DW_TAG_subprogram282	.byte	3                               # DW_AT_low_pc283	.long	.Lfunc_end1-.Lfunc_begin1       # DW_AT_high_pc284	.byte	1                               # DW_AT_frame_base285	.byte	86286	.byte	5                               # DW_AT_name287	.byte	0                               # DW_AT_decl_file288	.byte	9                               # DW_AT_decl_line289	.long	37                              # DW_AT_type290                                        # DW_AT_external291	.byte	5                               # Abbrev [5] 0x66:0xb DW_TAG_formal_parameter292	.byte	2                               # DW_AT_location293	.byte	145294	.byte	120295	.byte	6                               # DW_AT_name296	.byte	0                               # DW_AT_decl_file297	.byte	9                               # DW_AT_decl_line298	.long	37                              # DW_AT_type299	.byte	5                               # Abbrev [5] 0x71:0xb DW_TAG_formal_parameter300	.byte	2                               # DW_AT_location301	.byte	145302	.byte	112303	.byte	7                               # DW_AT_name304	.byte	0                               # DW_AT_decl_file305	.byte	9                               # DW_AT_decl_line306	.long	130                             # DW_AT_type307	.byte	0                               # End Of Children Mark308	.byte	7                               # Abbrev [7] 0x7d:0x5 DW_TAG_pointer_type309	.long	37                              # DW_AT_type310	.byte	7                               # Abbrev [7] 0x82:0x5 DW_TAG_pointer_type311	.long	135                             # DW_AT_type312	.byte	7                               # Abbrev [7] 0x87:0x5 DW_TAG_pointer_type313	.long	140                             # DW_AT_type314	.byte	3                               # Abbrev [3] 0x8c:0x4 DW_TAG_base_type315	.byte	8                               # DW_AT_name316	.byte	6                               # DW_AT_encoding317	.byte	1                               # DW_AT_byte_size318	.byte	0                               # End Of Children Mark319.Ldebug_info_dwo_end0:320	.section	.debug_abbrev.dwo,"e",@progbits321	.byte	1                               # Abbreviation Code322	.byte	17                              # DW_TAG_compile_unit323	.byte	1                               # DW_CHILDREN_yes324	.byte	37                              # DW_AT_producer325	.byte	37                              # DW_FORM_strx1326	.byte	19                              # DW_AT_language327	.byte	5                               # DW_FORM_data2328	.byte	3                               # DW_AT_name329	.byte	37                              # DW_FORM_strx1330	.byte	118                             # DW_AT_dwo_name331	.byte	37                              # DW_FORM_strx1332	.byte	0                               # EOM(1)333	.byte	0                               # EOM(2)334	.byte	2                               # Abbreviation Code335	.byte	52                              # DW_TAG_variable336	.byte	0                               # DW_CHILDREN_no337	.byte	3                               # DW_AT_name338	.byte	37                              # DW_FORM_strx1339	.byte	73                              # DW_AT_type340	.byte	19                              # DW_FORM_ref4341	.byte	63                              # DW_AT_external342	.byte	25                              # DW_FORM_flag_present343	.byte	58                              # DW_AT_decl_file344	.byte	11                              # DW_FORM_data1345	.byte	59                              # DW_AT_decl_line346	.byte	11                              # DW_FORM_data1347	.byte	2                               # DW_AT_location348	.byte	24                              # DW_FORM_exprloc349	.byte	0                               # EOM(1)350	.byte	0                               # EOM(2)351	.byte	3                               # Abbreviation Code352	.byte	36                              # DW_TAG_base_type353	.byte	0                               # DW_CHILDREN_no354	.byte	3                               # DW_AT_name355	.byte	37                              # DW_FORM_strx1356	.byte	62                              # DW_AT_encoding357	.byte	11                              # DW_FORM_data1358	.byte	11                              # DW_AT_byte_size359	.byte	11                              # DW_FORM_data1360	.byte	0                               # EOM(1)361	.byte	0                               # EOM(2)362	.byte	4                               # Abbreviation Code363	.byte	46                              # DW_TAG_subprogram364	.byte	1                               # DW_CHILDREN_yes365	.byte	17                              # DW_AT_low_pc366	.byte	27                              # DW_FORM_addrx367	.byte	18                              # DW_AT_high_pc368	.byte	6                               # DW_FORM_data4369	.byte	64                              # DW_AT_frame_base370	.byte	24                              # DW_FORM_exprloc371	.byte	110                             # DW_AT_linkage_name372	.byte	37                              # DW_FORM_strx1373	.byte	3                               # DW_AT_name374	.byte	37                              # DW_FORM_strx1375	.byte	58                              # DW_AT_decl_file376	.byte	11                              # DW_FORM_data1377	.byte	59                              # DW_AT_decl_line378	.byte	11                              # DW_FORM_data1379	.byte	63                              # DW_AT_external380	.byte	25                              # DW_FORM_flag_present381	.byte	0                               # EOM(1)382	.byte	0                               # EOM(2)383	.byte	5                               # Abbreviation Code384	.byte	5                               # DW_TAG_formal_parameter385	.byte	0                               # DW_CHILDREN_no386	.byte	2                               # DW_AT_location387	.byte	24                              # DW_FORM_exprloc388	.byte	3                               # DW_AT_name389	.byte	37                              # DW_FORM_strx1390	.byte	58                              # DW_AT_decl_file391	.byte	11                              # DW_FORM_data1392	.byte	59                              # DW_AT_decl_line393	.byte	11                              # DW_FORM_data1394	.byte	73                              # DW_AT_type395	.byte	19                              # DW_FORM_ref4396	.byte	0                               # EOM(1)397	.byte	0                               # EOM(2)398	.byte	6                               # Abbreviation Code399	.byte	46                              # DW_TAG_subprogram400	.byte	1                               # DW_CHILDREN_yes401	.byte	17                              # DW_AT_low_pc402	.byte	27                              # DW_FORM_addrx403	.byte	18                              # DW_AT_high_pc404	.byte	6                               # DW_FORM_data4405	.byte	64                              # DW_AT_frame_base406	.byte	24                              # DW_FORM_exprloc407	.byte	3                               # DW_AT_name408	.byte	37                              # DW_FORM_strx1409	.byte	58                              # DW_AT_decl_file410	.byte	11                              # DW_FORM_data1411	.byte	59                              # DW_AT_decl_line412	.byte	11                              # DW_FORM_data1413	.byte	73                              # DW_AT_type414	.byte	19                              # DW_FORM_ref4415	.byte	63                              # DW_AT_external416	.byte	25                              # DW_FORM_flag_present417	.byte	0                               # EOM(1)418	.byte	0                               # EOM(2)419	.byte	7                               # Abbreviation Code420	.byte	15                              # DW_TAG_pointer_type421	.byte	0                               # DW_CHILDREN_no422	.byte	73                              # DW_AT_type423	.byte	19                              # DW_FORM_ref4424	.byte	0                               # EOM(1)425	.byte	0                               # EOM(2)426	.byte	0                               # EOM(3)427	.section	.debug_addr,"",@progbits428	.long	.Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution429.Ldebug_addr_start0:430	.short	5                               # DWARF version number431	.byte	8                               # Address size432	.byte	0                               # Segment selector size433.Laddr_table_base0:434	.quad	x435	.quad	y436	.quad	.Lfunc_begin0437	.quad	.Lfunc_begin1438.Ldebug_addr_end0:439	.section	.debug_gnu_pubnames,"",@progbits440	.long	.LpubNames_end0-.LpubNames_start0 # Length of Public Names Info441.LpubNames_start0:442	.short	2                               # DWARF Version443	.long	.Lcu_begin0                     # Offset of Compilation Unit Info444	.long	40                              # Compilation Unit Length445	.long	87                              # DIE offset446	.byte	48                              # Attributes: FUNCTION, EXTERNAL447	.asciz	"main"                          # External Name448	.long	26                              # DIE offset449	.byte	32                              # Attributes: VARIABLE, EXTERNAL450	.asciz	"x"                             # External Name451	.long	41                              # DIE offset452	.byte	32                              # Attributes: VARIABLE, EXTERNAL453	.asciz	"y"                             # External Name454	.long	52                              # DIE offset455	.byte	48                              # Attributes: FUNCTION, EXTERNAL456	.asciz	"use"                           # External Name457	.long	0                               # End Mark458.LpubNames_end0:459	.section	.debug_gnu_pubtypes,"",@progbits460	.long	.LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info461.LpubTypes_start0:462	.short	2                               # DWARF Version463	.long	.Lcu_begin0                     # Offset of Compilation Unit Info464	.long	40                              # Compilation Unit Length465	.long	37                              # DIE offset466	.byte	144                             # Attributes: TYPE, STATIC467	.asciz	"int"                           # External Name468	.long	140                             # DIE offset469	.byte	144                             # Attributes: TYPE, STATIC470	.asciz	"char"                          # External Name471	.long	0                               # End Mark472.LpubTypes_end0:473	.ident	"clang version 15.0.0"474	.section	".note.GNU-stack","",@progbits475	.section	.debug_line,"",@progbits476.Lline_table_start0:477