brintos

brintos / llvm-project-archived public Read only

0
0
Text · 20.1 KiB · 46c99f2 Raw
474 lines · plain
1# clang++ -g -gdwarf-5 -emit-llvm -S  mainlocadddrx.cpp2# llc -O0 -mtriple=x86_64-unknown-linux-gnu mainlocadddrx.ll3# void use(int * x, int * y) {4# *x += 4;5# *y -= 2;6# }7#8# int x = 0;9# int y = 1;10# int  main(int argc, char *argv[]) {11#    x = argc;12#    y = argc + 3;13#    use(&x, &y);14#    return x + y;15# }16 17	.text18	.file	"mainlocadddrx.cpp"19	.file	0 "." "mainlocadddrx.cpp" md5 0xd4fd79ce0087c4cefd089752bf2182c620	.globl	_Z3usePiS_                      # -- Begin function _Z3usePiS_21	.p2align	4, 0x9022	.type	_Z3usePiS_,@function23_Z3usePiS_:                             # @_Z3usePiS_24.Lfunc_begin0:25	.loc	0 1 0                           # mainlocadddrx.cpp:1:026	.cfi_startproc27# %bb.0:                                # %entry28	pushq	%rbp29	.cfi_def_cfa_offset 1630	.cfi_offset %rbp, -1631	movq	%rsp, %rbp32	.cfi_def_cfa_register %rbp33	movq	%rdi, -8(%rbp)34	movq	%rsi, -16(%rbp)35.Ltmp0:36	.loc	0 2 2 prologue_end              # mainlocadddrx.cpp:2:237	movq	-8(%rbp), %rax38	.loc	0 2 4 is_stmt 0                 # mainlocadddrx.cpp:2:439	movl	(%rax), %ecx40	addl	$4, %ecx41	movl	%ecx, (%rax)42	.loc	0 3 2 is_stmt 1                 # mainlocadddrx.cpp:3:243	movq	-16(%rbp), %rax44	.loc	0 3 4 is_stmt 0                 # mainlocadddrx.cpp:3:445	movl	(%rax), %ecx46	subl	$2, %ecx47	movl	%ecx, (%rax)48	.loc	0 4 1 is_stmt 1                 # mainlocadddrx.cpp:4:149	popq	%rbp50	.cfi_def_cfa %rsp, 851	retq52.Ltmp1:53.Lfunc_end0:54	.size	_Z3usePiS_, .Lfunc_end0-_Z3usePiS_55	.cfi_endproc56                                        # -- End function57	.globl	main                            # -- Begin function main58	.p2align	4, 0x9059	.type	main,@function60main:                                   # @main61.Lfunc_begin1:62	.loc	0 8 0                           # mainlocadddrx.cpp:8:063	.cfi_startproc64# %bb.0:                                # %entry65	pushq	%rbp66	.cfi_def_cfa_offset 1667	.cfi_offset %rbp, -1668	movq	%rsp, %rbp69	.cfi_def_cfa_register %rbp70	subq	$16, %rsp71	movl	$0, -4(%rbp)72	movl	%edi, -8(%rbp)73	movq	%rsi, -16(%rbp)74.Ltmp2:75	.loc	0 9 8 prologue_end              # mainlocadddrx.cpp:9:876	movl	-8(%rbp), %eax77	.loc	0 9 6 is_stmt 0                 # mainlocadddrx.cpp:9:678	movl	%eax, x79	.loc	0 10 8 is_stmt 1                # mainlocadddrx.cpp:10:880	movl	-8(%rbp), %eax81	.loc	0 10 13 is_stmt 0               # mainlocadddrx.cpp:10:1382	addl	$3, %eax83	.loc	0 10 6                          # mainlocadddrx.cpp:10:684	movl	%eax, y85	.loc	0 11 4 is_stmt 1                # mainlocadddrx.cpp:11:486	movabsq	$x, %rdi87	movabsq	$y, %rsi88	callq	_Z3usePiS_89	.loc	0 12 11                         # mainlocadddrx.cpp:12:1190	movl	x, %eax91	.loc	0 12 13 is_stmt 0               # mainlocadddrx.cpp:12:1392	addl	y, %eax93	.loc	0 12 4                          # mainlocadddrx.cpp:12:494	addq	$16, %rsp95	popq	%rbp96	.cfi_def_cfa %rsp, 897	retq98.Ltmp3:99.Lfunc_end1:100	.size	main, .Lfunc_end1-main101	.cfi_endproc102                                        # -- End function103	.type	x,@object                       # @x104	.bss105	.globl	x106	.p2align	2107x:108	.long	0                               # 0x0109	.size	x, 4110 111	.type	y,@object                       # @y112	.data113	.globl	y114	.p2align	2115y:116	.long	1                               # 0x1117	.size	y, 4118 119	.section	.debug_abbrev,"",@progbits120	.byte	1                               # Abbreviation Code121	.byte	74                              # DW_TAG_skeleton_unit122	.byte	0                               # DW_CHILDREN_no123	.byte	16                              # DW_AT_stmt_list124	.byte	23                              # DW_FORM_sec_offset125	.byte	114                             # DW_AT_str_offsets_base126	.byte	23                              # DW_FORM_sec_offset127	.byte	27                              # DW_AT_comp_dir128	.byte	37                              # DW_FORM_strx1129	.ascii	"\264B"                         # DW_AT_GNU_pubnames130	.byte	25                              # DW_FORM_flag_present131	.byte	118                             # DW_AT_dwo_name132	.byte	37                              # DW_FORM_strx1133	.byte	17                              # DW_AT_low_pc134	.byte	27                              # DW_FORM_addrx135	.byte	18                              # DW_AT_high_pc136	.byte	6                               # DW_FORM_data4137	.byte	115                             # DW_AT_addr_base138	.byte	23                              # DW_FORM_sec_offset139	.byte	0                               # EOM(1)140	.byte	0                               # EOM(2)141	.byte	0                               # EOM(3)142	.section	.debug_info,"",@progbits143.Lcu_begin0:144	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit145.Ldebug_info_start0:146	.short	5                               # DWARF version number147	.byte	4                               # DWARF Unit Type148	.byte	8                               # Address Size (in bytes)149	.long	.debug_abbrev                   # Offset Into Abbrev. Section150	.quad	6364283817788887055151	.byte	1                               # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit152	.long	.Lline_table_start0             # DW_AT_stmt_list153	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base154	.byte	0                               # DW_AT_comp_dir155                                        # DW_AT_GNU_pubnames156	.byte	1                               # DW_AT_dwo_name157	.byte	2                               # DW_AT_low_pc158	.long	.Lfunc_end1-.Lfunc_begin0       # DW_AT_high_pc159	.long	.Laddr_table_base0              # DW_AT_addr_base160.Ldebug_info_end0:161	.section	.debug_str_offsets,"",@progbits162	.long	12                              # Length of String Offsets Set163	.short	5164	.short	0165.Lstr_offsets_base0:166	.section	.debug_str,"MS",@progbits,1167.Lskel_string0:168	.asciz	"."                             # string offset=0169.Lskel_string1:170	.asciz	"mainlocadddrx.dwo"             # string offset=2171	.section	.debug_str_offsets,"",@progbits172	.long	.Lskel_string0173	.long	.Lskel_string1174	.section	.debug_str_offsets.dwo,"e",@progbits175	.long	52                              # Length of String Offsets Set176	.short	5177	.short	0178	.section	.debug_str.dwo,"eMS",@progbits,1179.Linfo_string0:180	.asciz	"x"                             # string offset=0181.Linfo_string1:182	.asciz	"int"                           # string offset=2183.Linfo_string2:184	.asciz	"y"                             # string offset=6185.Linfo_string3:186	.asciz	"_Z3usePiS_"                    # string offset=8187.Linfo_string4:188	.asciz	"use"                           # string offset=19189.Linfo_string5:190	.asciz	"main"                          # string offset=23191.Linfo_string6:192	.asciz	"argc"                          # string offset=28193.Linfo_string7:194	.asciz	"argv"                          # string offset=33195.Linfo_string8:196	.asciz	"char"                          # string offset=38197.Linfo_string9:198	.asciz	"clang version 15.0.0"          # string offset=43199.Linfo_string10:200	.asciz	"mainlocadddrx.cpp"             # string offset=64201.Linfo_string11:202	.asciz	"mainlocadddrx.dwo"             # string offset=82203	.section	.debug_str_offsets.dwo,"e",@progbits204	.long	0205	.long	2206	.long	6207	.long	8208	.long	19209	.long	23210	.long	28211	.long	33212	.long	38213	.long	43214	.long	64215	.long	82216	.section	.debug_info.dwo,"e",@progbits217	.long	.Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit218.Ldebug_info_dwo_start0:219	.short	5                               # DWARF version number220	.byte	5                               # DWARF Unit Type221	.byte	8                               # Address Size (in bytes)222	.long	0                               # Offset Into Abbrev. Section223	.quad	6364283817788887055224	.byte	1                               # Abbrev [1] 0x14:0x7d DW_TAG_compile_unit225	.byte	9                               # DW_AT_producer226	.short	33                              # DW_AT_language227	.byte	10                              # DW_AT_name228	.byte	11                              # DW_AT_dwo_name229	.byte	2                               # Abbrev [2] 0x1a:0xb DW_TAG_variable230	.byte	0                               # DW_AT_name231	.long	37                              # DW_AT_type232                                        # DW_AT_external233	.byte	0                               # DW_AT_decl_file234	.byte	6                               # DW_AT_decl_line235	.byte	2                               # DW_AT_location236	.byte	161237	.byte	0238	.byte	3                               # Abbrev [3] 0x25:0x4 DW_TAG_base_type239	.byte	1                               # DW_AT_name240	.byte	5                               # DW_AT_encoding241	.byte	4                               # DW_AT_byte_size242	.byte	2                               # Abbrev [2] 0x29:0xb DW_TAG_variable243	.byte	2                               # DW_AT_name244	.long	37                              # DW_AT_type245                                        # DW_AT_external246	.byte	0                               # DW_AT_decl_file247	.byte	7                               # DW_AT_decl_line248	.byte	2                               # DW_AT_location249	.byte	161250	.byte	1251	.byte	4                               # Abbrev [4] 0x34:0x23 DW_TAG_subprogram252	.byte	2                               # DW_AT_low_pc253	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc254	.byte	1                               # DW_AT_frame_base255	.byte	86256	.byte	3                               # DW_AT_linkage_name257	.byte	4                               # DW_AT_name258	.byte	0                               # DW_AT_decl_file259	.byte	1                               # DW_AT_decl_line260                                        # DW_AT_external261	.byte	5                               # Abbrev [5] 0x40:0xb DW_TAG_formal_parameter262	.byte	2                               # DW_AT_location263	.byte	145264	.byte	120265	.byte	0                               # DW_AT_name266	.byte	0                               # DW_AT_decl_file267	.byte	1                               # DW_AT_decl_line268	.long	125                             # DW_AT_type269	.byte	5                               # Abbrev [5] 0x4b:0xb DW_TAG_formal_parameter270	.byte	2                               # DW_AT_location271	.byte	145272	.byte	112273	.byte	2                               # DW_AT_name274	.byte	0                               # DW_AT_decl_file275	.byte	1                               # DW_AT_decl_line276	.long	125                             # DW_AT_type277	.byte	0                               # End Of Children Mark278	.byte	6                               # Abbrev [6] 0x57:0x26 DW_TAG_subprogram279	.byte	3                               # DW_AT_low_pc280	.long	.Lfunc_end1-.Lfunc_begin1       # DW_AT_high_pc281	.byte	1                               # DW_AT_frame_base282	.byte	86283	.byte	5                               # DW_AT_name284	.byte	0                               # DW_AT_decl_file285	.byte	8                               # DW_AT_decl_line286	.long	37                              # DW_AT_type287                                        # DW_AT_external288	.byte	5                               # Abbrev [5] 0x66:0xb DW_TAG_formal_parameter289	.byte	2                               # DW_AT_location290	.byte	145291	.byte	120292	.byte	6                               # DW_AT_name293	.byte	0                               # DW_AT_decl_file294	.byte	8                               # DW_AT_decl_line295	.long	37                              # DW_AT_type296	.byte	5                               # Abbrev [5] 0x71:0xb DW_TAG_formal_parameter297	.byte	2                               # DW_AT_location298	.byte	145299	.byte	112300	.byte	7                               # DW_AT_name301	.byte	0                               # DW_AT_decl_file302	.byte	8                               # DW_AT_decl_line303	.long	130                             # DW_AT_type304	.byte	0                               # End Of Children Mark305	.byte	7                               # Abbrev [7] 0x7d:0x5 DW_TAG_pointer_type306	.long	37                              # DW_AT_type307	.byte	7                               # Abbrev [7] 0x82:0x5 DW_TAG_pointer_type308	.long	135                             # DW_AT_type309	.byte	7                               # Abbrev [7] 0x87:0x5 DW_TAG_pointer_type310	.long	140                             # DW_AT_type311	.byte	3                               # Abbrev [3] 0x8c:0x4 DW_TAG_base_type312	.byte	8                               # DW_AT_name313	.byte	6                               # DW_AT_encoding314	.byte	1                               # DW_AT_byte_size315	.byte	0                               # End Of Children Mark316.Ldebug_info_dwo_end0:317	.section	.debug_abbrev.dwo,"e",@progbits318	.byte	1                               # Abbreviation Code319	.byte	17                              # DW_TAG_compile_unit320	.byte	1                               # DW_CHILDREN_yes321	.byte	37                              # DW_AT_producer322	.byte	37                              # DW_FORM_strx1323	.byte	19                              # DW_AT_language324	.byte	5                               # DW_FORM_data2325	.byte	3                               # DW_AT_name326	.byte	37                              # DW_FORM_strx1327	.byte	118                             # DW_AT_dwo_name328	.byte	37                              # DW_FORM_strx1329	.byte	0                               # EOM(1)330	.byte	0                               # EOM(2)331	.byte	2                               # Abbreviation Code332	.byte	52                              # DW_TAG_variable333	.byte	0                               # DW_CHILDREN_no334	.byte	3                               # DW_AT_name335	.byte	37                              # DW_FORM_strx1336	.byte	73                              # DW_AT_type337	.byte	19                              # DW_FORM_ref4338	.byte	63                              # DW_AT_external339	.byte	25                              # DW_FORM_flag_present340	.byte	58                              # DW_AT_decl_file341	.byte	11                              # DW_FORM_data1342	.byte	59                              # DW_AT_decl_line343	.byte	11                              # DW_FORM_data1344	.byte	2                               # DW_AT_location345	.byte	24                              # DW_FORM_exprloc346	.byte	0                               # EOM(1)347	.byte	0                               # EOM(2)348	.byte	3                               # Abbreviation Code349	.byte	36                              # DW_TAG_base_type350	.byte	0                               # DW_CHILDREN_no351	.byte	3                               # DW_AT_name352	.byte	37                              # DW_FORM_strx1353	.byte	62                              # DW_AT_encoding354	.byte	11                              # DW_FORM_data1355	.byte	11                              # DW_AT_byte_size356	.byte	11                              # DW_FORM_data1357	.byte	0                               # EOM(1)358	.byte	0                               # EOM(2)359	.byte	4                               # Abbreviation Code360	.byte	46                              # DW_TAG_subprogram361	.byte	1                               # DW_CHILDREN_yes362	.byte	17                              # DW_AT_low_pc363	.byte	27                              # DW_FORM_addrx364	.byte	18                              # DW_AT_high_pc365	.byte	6                               # DW_FORM_data4366	.byte	64                              # DW_AT_frame_base367	.byte	24                              # DW_FORM_exprloc368	.byte	110                             # DW_AT_linkage_name369	.byte	37                              # DW_FORM_strx1370	.byte	3                               # DW_AT_name371	.byte	37                              # DW_FORM_strx1372	.byte	58                              # DW_AT_decl_file373	.byte	11                              # DW_FORM_data1374	.byte	59                              # DW_AT_decl_line375	.byte	11                              # DW_FORM_data1376	.byte	63                              # DW_AT_external377	.byte	25                              # DW_FORM_flag_present378	.byte	0                               # EOM(1)379	.byte	0                               # EOM(2)380	.byte	5                               # Abbreviation Code381	.byte	5                               # DW_TAG_formal_parameter382	.byte	0                               # DW_CHILDREN_no383	.byte	2                               # DW_AT_location384	.byte	24                              # DW_FORM_exprloc385	.byte	3                               # DW_AT_name386	.byte	37                              # DW_FORM_strx1387	.byte	58                              # DW_AT_decl_file388	.byte	11                              # DW_FORM_data1389	.byte	59                              # DW_AT_decl_line390	.byte	11                              # DW_FORM_data1391	.byte	73                              # DW_AT_type392	.byte	19                              # DW_FORM_ref4393	.byte	0                               # EOM(1)394	.byte	0                               # EOM(2)395	.byte	6                               # Abbreviation Code396	.byte	46                              # DW_TAG_subprogram397	.byte	1                               # DW_CHILDREN_yes398	.byte	17                              # DW_AT_low_pc399	.byte	27                              # DW_FORM_addrx400	.byte	18                              # DW_AT_high_pc401	.byte	6                               # DW_FORM_data4402	.byte	64                              # DW_AT_frame_base403	.byte	24                              # DW_FORM_exprloc404	.byte	3                               # DW_AT_name405	.byte	37                              # DW_FORM_strx1406	.byte	58                              # DW_AT_decl_file407	.byte	11                              # DW_FORM_data1408	.byte	59                              # DW_AT_decl_line409	.byte	11                              # DW_FORM_data1410	.byte	73                              # DW_AT_type411	.byte	19                              # DW_FORM_ref4412	.byte	63                              # DW_AT_external413	.byte	25                              # DW_FORM_flag_present414	.byte	0                               # EOM(1)415	.byte	0                               # EOM(2)416	.byte	7                               # Abbreviation Code417	.byte	15                              # DW_TAG_pointer_type418	.byte	0                               # DW_CHILDREN_no419	.byte	73                              # DW_AT_type420	.byte	19                              # DW_FORM_ref4421	.byte	0                               # EOM(1)422	.byte	0                               # EOM(2)423	.byte	0                               # EOM(3)424	.section	.debug_addr,"",@progbits425	.long	.Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution426.Ldebug_addr_start0:427	.short	5                               # DWARF version number428	.byte	8                               # Address size429	.byte	0                               # Segment selector size430.Laddr_table_base0:431	.quad	x432	.quad	y433	.quad	.Lfunc_begin0434	.quad	.Lfunc_begin1435.Ldebug_addr_end0:436	.section	.debug_gnu_pubnames,"",@progbits437	.long	.LpubNames_end0-.LpubNames_start0 # Length of Public Names Info438.LpubNames_start0:439	.short	2                               # DWARF Version440	.long	.Lcu_begin0                     # Offset of Compilation Unit Info441	.long	40                              # Compilation Unit Length442	.long	87                              # DIE offset443	.byte	48                              # Attributes: FUNCTION, EXTERNAL444	.asciz	"main"                          # External Name445	.long	26                              # DIE offset446	.byte	32                              # Attributes: VARIABLE, EXTERNAL447	.asciz	"x"                             # External Name448	.long	41                              # DIE offset449	.byte	32                              # Attributes: VARIABLE, EXTERNAL450	.asciz	"y"                             # External Name451	.long	52                              # DIE offset452	.byte	48                              # Attributes: FUNCTION, EXTERNAL453	.asciz	"use"                           # External Name454	.long	0                               # End Mark455.LpubNames_end0:456	.section	.debug_gnu_pubtypes,"",@progbits457	.long	.LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info458.LpubTypes_start0:459	.short	2                               # DWARF Version460	.long	.Lcu_begin0                     # Offset of Compilation Unit Info461	.long	40                              # Compilation Unit Length462	.long	37                              # DIE offset463	.byte	144                             # Attributes: TYPE, STATIC464	.asciz	"int"                           # External Name465	.long	140                             # DIE offset466	.byte	144                             # Attributes: TYPE, STATIC467	.asciz	"char"                          # External Name468	.long	0                               # End Mark469.LpubTypes_end0:470	.ident	"clang version 15.0.0"471	.section	".note.GNU-stack","",@progbits472	.section	.debug_line,"",@progbits473.Lline_table_start0:474