Created
April 25, 2016 18:59
-
-
Save yurydelendik/352dc3250d92191fc7f38dd0daf6a022 to your computer and use it in GitHub Desktop.
Example of wast with some debug comments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct z { | |
int x; | |
float y; | |
} i; | |
int main() { | |
struct z t[10]; | |
int i, j; | |
for (i = 0; i < 9; i++) | |
t[i].x = i; | |
for (j = 0; j < 8; j++) { | |
float i = t[j].x / 2.0; | |
t[j].y = i; | |
} | |
float sum = t[1].x + t[2].y; | |
return (int)sum; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.text | |
.file "hello.bc" | |
.file 1 "hello.c" | |
.hidden main | |
.globl main | |
.type main,@function | |
main: # @main | |
.Lfunc_begin0: | |
.loc 1 6 0 # hello.c:6:0 | |
.result i32 | |
.local f32, i32, i32, i32 | |
# BB#0: # %entry | |
i32.const $push24=, __stack_pointer | |
i32.load $push25=, 0($pop24) | |
i32.const $push26=, 80 | |
i32.sub $3=, $pop25, $pop26 | |
i32.const $2=, 0 | |
.Ltmp0: | |
#DEBUG_VALUE: main:i <- 0 | |
copy_local $1=, $3 | |
.Ltmp1: | |
#DEBUG_VALUE: main:t <- undef | |
.LBB0_1: # %for.cond | |
# =>This Inner Loop Header: Depth=1 | |
loop # label0: | |
.Ltmp2: | |
.loc 1 9 3 prologue_end discriminator 1 # hello.c:9:3 | |
i32.const $push13=, 9 | |
i32.eq $push0=, $2, $pop13 | |
br_if 1, $pop0 # 1: down to label1 | |
# BB#2: # %for.body | |
# in Loop: Header=BB0_1 Depth=1 | |
.loc 1 10 12 # hello.c:10:12 | |
i32.store $push1=, 0($1):p2align=3, $2 | |
.loc 1 9 23 discriminator 2 # hello.c:9:23 | |
i32.const $push15=, 1 | |
i32.add $2=, $pop1, $pop15 | |
.Ltmp3: | |
#DEBUG_VALUE: main:i <- %vreg34 | |
.loc 1 9 3 is_stmt 0 discriminator 2 # hello.c:9:3 | |
i32.const $push14=, 8 | |
i32.add $1=, $1, $pop14 | |
br 0 # 0: up to label0 | |
.Ltmp4: | |
.LBB0_3: # %for.cond1.preheader | |
end_loop # label1: | |
i32.const $2=, 0 | |
.LBB0_4: # %for.cond1 | |
# =>This Inner Loop Header: Depth=1 | |
loop # label2: | |
.Ltmp5: | |
.loc 1 11 3 is_stmt 1 discriminator 1 # hello.c:11:3 | |
i32.const $push19=, 8 | |
i32.add $push18=, $2, $pop19 | |
tee_local $push17=, $1=, $pop18 | |
i32.const $push16=, 72 | |
i32.eq $push2=, $pop17, $pop16 | |
br_if 1, $pop2 # 1: down to label3 | |
# BB#5: # %for.body3 | |
# in Loop: Header=BB0_4 Depth=1 | |
.Ltmp6: | |
.loc 1 12 20 # hello.c:12:20 | |
i32.add $push23=, $3, $2 | |
tee_local $push22=, $2=, $pop23 | |
i32.load $push3=, 0($pop22):p2align=3 | |
.loc 1 12 15 is_stmt 0 # hello.c:12:15 | |
f64.convert_s/i32 $push4=, $pop3 | |
.loc 1 12 22 # hello.c:12:22 | |
f64.const $push21=, 0x1p-1 | |
f64.mul $push5=, $pop4, $pop21 | |
.loc 1 12 15 # hello.c:12:15 | |
f32.demote/f64 $0=, $pop5 | |
.Ltmp7: | |
#DEBUG_VALUE: i <- %vreg22 | |
.loc 1 13 12 is_stmt 1 # hello.c:13:12 | |
i32.const $push20=, 4 | |
i32.add $push6=, $2, $pop20 | |
f32.store $discard=, 0($pop6), $0 | |
copy_local $2=, $1 | |
br 0 # 0: up to label2 | |
.Ltmp8: | |
.LBB0_6: # %for.end11 | |
end_loop # label3: | |
.loc 1 15 20 # hello.c:15:20 | |
i32.load $push7=, 8($3):p2align=3 | |
.loc 1 15 15 is_stmt 0 # hello.c:15:15 | |
f32.convert_s/i32 $push8=, $pop7 | |
.loc 1 15 29 # hello.c:15:29 | |
i32.const $push9=, 20 | |
i32.add $push10=, $3, $pop9 | |
f32.load $push11=, 0($pop10) | |
.loc 1 15 22 # hello.c:15:22 | |
f32.add $0=, $pop8, $pop11 | |
.Ltmp9: | |
#DEBUG_VALUE: main:sum <- %vreg22 | |
.loc 1 16 10 is_stmt 1 # hello.c:16:10 | |
i32.trunc_s/f32 $push12=, $0 | |
.loc 1 16 3 is_stmt 0 # hello.c:16:3 | |
return $pop12 | |
.Ltmp10: | |
.endfunc | |
.Lfunc_end0: | |
.size main, .Lfunc_end0-main | |
.hidden i # @i | |
.type i,@object | |
.bss | |
.globl i | |
.p2align 2 | |
i: | |
.skip 8 | |
.size i, 8 | |
.section .debug_str,"MS",@progbits,1 | |
.Linfo_string0: | |
.asciz "clang version 3.9.0 (trunk 266025)" # string offset=0 | |
.Linfo_string1: | |
.asciz "hello.c" # string offset=35 | |
.Linfo_string2: | |
.asciz "/Users/yury/llvmwasm" # string offset=43 | |
.Linfo_string3: | |
.asciz "i" # string offset=64 | |
.Linfo_string4: | |
.asciz "x" # string offset=66 | |
.Linfo_string5: | |
.asciz "int" # string offset=68 | |
.Linfo_string6: | |
.asciz "y" # string offset=72 | |
.Linfo_string7: | |
.asciz "float" # string offset=74 | |
.Linfo_string8: | |
.asciz "z" # string offset=80 | |
.Linfo_string9: | |
.asciz "main" # string offset=82 | |
.Linfo_string10: | |
.asciz "t" # string offset=87 | |
.Linfo_string11: | |
.asciz "sizetype" # string offset=89 | |
.Linfo_string12: | |
.asciz "sum" # string offset=98 | |
.Linfo_string13: | |
.asciz "j" # string offset=102 | |
.section .debug_loc,"",@progbits | |
.Ldebug_loc0: | |
.int32 .Ltmp0-.Lfunc_begin0 | |
.int32 .Ltmp3-.Lfunc_begin0 | |
.int16 3 # Loc expr size | |
.int8 17 # DW_OP_consts | |
.int8 0 # 0 | |
.int8 159 # DW_OP_stack_value | |
.int32 .Ltmp3-.Lfunc_begin0 | |
.int32 .Lfunc_end0-.Lfunc_begin0 | |
.int16 1 # Loc expr size | |
.int8 150 # nop (could not find a dwarf register number) DW_OP_nop | |
.int32 0 | |
.int32 0 | |
.Ldebug_loc1: | |
.int32 .Ltmp7-.Lfunc_begin0 | |
.int32 .Lfunc_end0-.Lfunc_begin0 | |
.int16 1 # Loc expr size | |
.int8 150 # nop (could not find a dwarf register number) DW_OP_nop | |
.int32 0 | |
.int32 0 | |
.Ldebug_loc2: | |
.int32 .Ltmp9-.Lfunc_begin0 | |
.int32 .Lfunc_end0-.Lfunc_begin0 | |
.int16 1 # Loc expr size | |
.int8 150 # nop (could not find a dwarf register number) DW_OP_nop | |
.int32 0 | |
.int32 0 | |
.section .debug_abbrev,"",@progbits | |
.Lsection_abbrev: | |
.int8 1 # Abbreviation Code | |
.int8 17 # DW_TAG_compile_unit | |
.int8 1 # DW_CHILDREN_yes | |
.int8 37 # DW_AT_producer | |
.int8 14 # DW_FORM_strp | |
.int8 19 # DW_AT_language | |
.int8 5 # DW_FORM_data2 | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 16 # DW_AT_stmt_list | |
.int8 23 # DW_FORM_sec_offset | |
.int8 27 # DW_AT_comp_dir | |
.int8 14 # DW_FORM_strp | |
.ascii "\341\177" # DW_AT_APPLE_optimized | |
.int8 25 # DW_FORM_flag_present | |
.int8 17 # DW_AT_low_pc | |
.int8 1 # DW_FORM_addr | |
.int8 18 # DW_AT_high_pc | |
.int8 6 # DW_FORM_data4 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 2 # Abbreviation Code | |
.int8 52 # DW_TAG_variable | |
.int8 0 # DW_CHILDREN_no | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 63 # DW_AT_external | |
.int8 25 # DW_FORM_flag_present | |
.int8 58 # DW_AT_decl_file | |
.int8 11 # DW_FORM_data1 | |
.int8 59 # DW_AT_decl_line | |
.int8 11 # DW_FORM_data1 | |
.int8 2 # DW_AT_location | |
.int8 24 # DW_FORM_exprloc | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 3 # Abbreviation Code | |
.int8 19 # DW_TAG_structure_type | |
.int8 1 # DW_CHILDREN_yes | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 11 # DW_AT_byte_size | |
.int8 11 # DW_FORM_data1 | |
.int8 58 # DW_AT_decl_file | |
.int8 11 # DW_FORM_data1 | |
.int8 59 # DW_AT_decl_line | |
.int8 11 # DW_FORM_data1 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 4 # Abbreviation Code | |
.int8 13 # DW_TAG_member | |
.int8 0 # DW_CHILDREN_no | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 58 # DW_AT_decl_file | |
.int8 11 # DW_FORM_data1 | |
.int8 59 # DW_AT_decl_line | |
.int8 11 # DW_FORM_data1 | |
.int8 56 # DW_AT_data_member_location | |
.int8 11 # DW_FORM_data1 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 5 # Abbreviation Code | |
.int8 36 # DW_TAG_base_type | |
.int8 0 # DW_CHILDREN_no | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 62 # DW_AT_encoding | |
.int8 11 # DW_FORM_data1 | |
.int8 11 # DW_AT_byte_size | |
.int8 11 # DW_FORM_data1 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 6 # Abbreviation Code | |
.int8 46 # DW_TAG_subprogram | |
.int8 1 # DW_CHILDREN_yes | |
.int8 17 # DW_AT_low_pc | |
.int8 1 # DW_FORM_addr | |
.int8 18 # DW_AT_high_pc | |
.int8 6 # DW_FORM_data4 | |
.ascii "\347\177" # DW_AT_APPLE_omit_frame_ptr | |
.int8 25 # DW_FORM_flag_present | |
.int8 64 # DW_AT_frame_base | |
.int8 24 # DW_FORM_exprloc | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 58 # DW_AT_decl_file | |
.int8 11 # DW_FORM_data1 | |
.int8 59 # DW_AT_decl_line | |
.int8 11 # DW_FORM_data1 | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 63 # DW_AT_external | |
.int8 25 # DW_FORM_flag_present | |
.ascii "\341\177" # DW_AT_APPLE_optimized | |
.int8 25 # DW_FORM_flag_present | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 7 # Abbreviation Code | |
.int8 52 # DW_TAG_variable | |
.int8 0 # DW_CHILDREN_no | |
.int8 2 # DW_AT_location | |
.int8 24 # DW_FORM_exprloc | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 58 # DW_AT_decl_file | |
.int8 11 # DW_FORM_data1 | |
.int8 59 # DW_AT_decl_line | |
.int8 11 # DW_FORM_data1 | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 8 # Abbreviation Code | |
.int8 52 # DW_TAG_variable | |
.int8 0 # DW_CHILDREN_no | |
.int8 2 # DW_AT_location | |
.int8 23 # DW_FORM_sec_offset | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 58 # DW_AT_decl_file | |
.int8 11 # DW_FORM_data1 | |
.int8 59 # DW_AT_decl_line | |
.int8 11 # DW_FORM_data1 | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 9 # Abbreviation Code | |
.int8 52 # DW_TAG_variable | |
.int8 0 # DW_CHILDREN_no | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 58 # DW_AT_decl_file | |
.int8 11 # DW_FORM_data1 | |
.int8 59 # DW_AT_decl_line | |
.int8 11 # DW_FORM_data1 | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 10 # Abbreviation Code | |
.int8 11 # DW_TAG_lexical_block | |
.int8 1 # DW_CHILDREN_yes | |
.int8 17 # DW_AT_low_pc | |
.int8 1 # DW_FORM_addr | |
.int8 18 # DW_AT_high_pc | |
.int8 6 # DW_FORM_data4 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 11 # Abbreviation Code | |
.int8 1 # DW_TAG_array_type | |
.int8 1 # DW_CHILDREN_yes | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 12 # Abbreviation Code | |
.int8 33 # DW_TAG_subrange_type | |
.int8 0 # DW_CHILDREN_no | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 55 # DW_AT_count | |
.int8 11 # DW_FORM_data1 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 13 # Abbreviation Code | |
.int8 36 # DW_TAG_base_type | |
.int8 0 # DW_CHILDREN_no | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 11 # DW_AT_byte_size | |
.int8 11 # DW_FORM_data1 | |
.int8 62 # DW_AT_encoding | |
.int8 11 # DW_FORM_data1 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 0 # EOM(3) | |
.section .debug_info,"",@progbits | |
.Lsection_info: | |
.Lcu_begin0: | |
.int32 219 # Length of Unit | |
.int16 4 # DWARF version number | |
.int32 .Lsection_abbrev # Offset Into Abbrev. Section | |
.int8 4 # Address Size (in bytes) | |
.int8 1 # Abbrev [1] 0xb:0xd4 DW_TAG_compile_unit | |
.int32 .Linfo_string0 # DW_AT_producer | |
.int16 12 # DW_AT_language | |
.int32 .Linfo_string1 # DW_AT_name | |
.int32 .Lline_table_start0 # DW_AT_stmt_list | |
.int32 .Linfo_string2 # DW_AT_comp_dir | |
# DW_AT_APPLE_optimized | |
.int32 .Lfunc_begin0 # DW_AT_low_pc | |
.int32 .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc | |
.int8 2 # Abbrev [2] 0x26:0x11 DW_TAG_variable | |
.int32 .Linfo_string3 # DW_AT_name | |
.int32 55 # DW_AT_type | |
# DW_AT_external | |
.int8 1 # DW_AT_decl_file | |
.int8 4 # DW_AT_decl_line | |
.int8 5 # DW_AT_location | |
.int8 3 | |
.int32 i | |
.int8 3 # Abbrev [3] 0x37:0x21 DW_TAG_structure_type | |
.int32 .Linfo_string8 # DW_AT_name | |
.int8 8 # DW_AT_byte_size | |
.int8 1 # DW_AT_decl_file | |
.int8 1 # DW_AT_decl_line | |
.int8 4 # Abbrev [4] 0x3f:0xc DW_TAG_member | |
.int32 .Linfo_string4 # DW_AT_name | |
.int32 88 # DW_AT_type | |
.int8 1 # DW_AT_decl_file | |
.int8 2 # DW_AT_decl_line | |
.int8 0 # DW_AT_data_member_location | |
.int8 4 # Abbrev [4] 0x4b:0xc DW_TAG_member | |
.int32 .Linfo_string6 # DW_AT_name | |
.int32 95 # DW_AT_type | |
.int8 1 # DW_AT_decl_file | |
.int8 3 # DW_AT_decl_line | |
.int8 4 # DW_AT_data_member_location | |
.int8 0 # End Of Children Mark | |
.int8 5 # Abbrev [5] 0x58:0x7 DW_TAG_base_type | |
.int32 .Linfo_string5 # DW_AT_name | |
.int8 5 # DW_AT_encoding | |
.int8 4 # DW_AT_byte_size | |
.int8 5 # Abbrev [5] 0x5f:0x7 DW_TAG_base_type | |
.int32 .Linfo_string7 # DW_AT_name | |
.int8 4 # DW_AT_encoding | |
.int8 4 # DW_AT_byte_size | |
.int8 6 # Abbrev [6] 0x66:0x65 DW_TAG_subprogram | |
.int32 .Lfunc_begin0 # DW_AT_low_pc | |
.int32 .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc | |
# DW_AT_APPLE_omit_frame_ptr | |
.int8 0 # DW_AT_frame_base | |
.int32 .Linfo_string9 # DW_AT_name | |
.int8 1 # DW_AT_decl_file | |
.int8 6 # DW_AT_decl_line | |
.int32 88 # DW_AT_type | |
# DW_AT_external | |
# DW_AT_APPLE_optimized | |
.int8 7 # Abbrev [7] 0x7a:0xe DW_TAG_variable | |
.int8 2 # DW_AT_location | |
.int8 145 | |
.int8 0 | |
.int32 .Linfo_string10 # DW_AT_name | |
.int8 1 # DW_AT_decl_file | |
.int8 7 # DW_AT_decl_line | |
.int32 203 # DW_AT_type | |
.int8 8 # Abbrev [8] 0x88:0xf DW_TAG_variable | |
.int32 .Ldebug_loc0 # DW_AT_location | |
.int32 .Linfo_string3 # DW_AT_name | |
.int8 1 # DW_AT_decl_file | |
.int8 8 # DW_AT_decl_line | |
.int32 88 # DW_AT_type | |
.int8 8 # Abbrev [8] 0x97:0xf DW_TAG_variable | |
.int32 .Ldebug_loc2 # DW_AT_location | |
.int32 .Linfo_string12 # DW_AT_name | |
.int8 1 # DW_AT_decl_file | |
.int8 15 # DW_AT_decl_line | |
.int32 95 # DW_AT_type | |
.int8 9 # Abbrev [9] 0xa6:0xb DW_TAG_variable | |
.int32 .Linfo_string13 # DW_AT_name | |
.int8 1 # DW_AT_decl_file | |
.int8 8 # DW_AT_decl_line | |
.int32 88 # DW_AT_type | |
.int8 10 # Abbrev [10] 0xb1:0x19 DW_TAG_lexical_block | |
.int32 .Ltmp6 # DW_AT_low_pc | |
.int32 .Ltmp8-.Ltmp6 # DW_AT_high_pc | |
.int8 8 # Abbrev [8] 0xba:0xf DW_TAG_variable | |
.int32 .Ldebug_loc1 # DW_AT_location | |
.int32 .Linfo_string3 # DW_AT_name | |
.int8 1 # DW_AT_decl_file | |
.int8 12 # DW_AT_decl_line | |
.int32 95 # DW_AT_type | |
.int8 0 # End Of Children Mark | |
.int8 0 # End Of Children Mark | |
.int8 11 # Abbrev [11] 0xcb:0xc DW_TAG_array_type | |
.int32 55 # DW_AT_type | |
.int8 12 # Abbrev [12] 0xd0:0x6 DW_TAG_subrange_type | |
.int32 215 # DW_AT_type | |
.int8 10 # DW_AT_count | |
.int8 0 # End Of Children Mark | |
.int8 13 # Abbrev [13] 0xd7:0x7 DW_TAG_base_type | |
.int32 .Linfo_string11 # DW_AT_name | |
.int8 8 # DW_AT_byte_size | |
.int8 7 # DW_AT_encoding | |
.int8 0 # End Of Children Mark | |
.section .debug_ranges,"",@progbits | |
.Ldebug_range: | |
.section .debug_macinfo,"",@progbits | |
.Ldebug_macinfo: | |
.Lcu_macro_begin0: | |
.int8 0 # End Of Macro List Mark | |
.section .debug_pubnames,"",@progbits | |
.int32 .LpubNames_end0-.LpubNames_begin0 # Length of Public Names Info | |
.LpubNames_begin0: | |
.int16 2 # DWARF Version | |
.int32 .Lcu_begin0 # Offset of Compilation Unit Info | |
.int32 223 # Compilation Unit Length | |
.int32 102 # DIE offset | |
.asciz "main" # External Name | |
.int32 38 # DIE offset | |
.asciz "i" # External Name | |
.int32 0 # End Mark | |
.LpubNames_end0: | |
.section .debug_pubtypes,"",@progbits | |
.int32 .LpubTypes_end0-.LpubTypes_begin0 # Length of Public Types Info | |
.LpubTypes_begin0: | |
.int16 2 # DWARF Version | |
.int32 .Lcu_begin0 # Offset of Compilation Unit Info | |
.int32 223 # Compilation Unit Length | |
.int32 95 # DIE offset | |
.asciz "float" # External Name | |
.int32 55 # DIE offset | |
.asciz "z" # External Name | |
.int32 88 # DIE offset | |
.asciz "int" # External Name | |
.int32 0 # End Mark | |
.LpubTypes_end0: | |
.ident "clang version 3.9.0 (trunk 266025)" | |
.section .debug_line,"",@progbits | |
.Lline_table_start0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(module | |
(memory 1) | |
(export "memory" memory) | |
(export "main" $main) | |
(;!file 1 "hello.c";) | |
(func $main (result i32) | |
(local $$0 f32) | |
(local $$1 i32) | |
(local $$2 i32) | |
(local $$3 i32) | |
(;!bookmark main;) | |
(;!bookmark .Lfunc_begin0;) | |
(;!loc 1 6 0;) | |
(set_local $$3 | |
(i32.sub | |
(i32.load | |
(i32.const 4) | |
) | |
(i32.const 80) | |
) | |
) | |
(set_local $$2 | |
(i32.const 0) | |
) | |
(;!bookmark .Ltmp0;) | |
(set_local $$1 | |
(get_local $$3) | |
) | |
(;!bookmark .LBB0_1;) | |
(loop $label$1 $label$0 | |
(;!bookmark .Ltmp2;) | |
(;!loc 1 9 3;) | |
(br_if $label$1 | |
(i32.eq | |
(get_local $$2) | |
(i32.const 9) | |
) | |
) | |
(;!loc 1 9 23;) | |
(set_local $$2 | |
(i32.add | |
(;!loc 1 10 12;) | |
(i32.store align=8 | |
(get_local $$1) | |
(get_local $$2) | |
) | |
(;!loc 1 9 23;) | |
(i32.const 1) | |
) | |
) | |
(;!bookmark .Ltmp3;) | |
(;!loc 1 9 3;) | |
(set_local $$1 | |
(i32.add | |
(get_local $$1) | |
(i32.const 8) | |
) | |
) | |
(br $label$0) | |
) | |
(;!bookmark .LBB0_3;) | |
(;!loc 1 9 3;) | |
(set_local $$2 | |
(i32.const 0) | |
) | |
(;!bookmark .LBB0_4;) | |
(loop $label$3 $label$2 | |
(;!bookmark .Ltmp5;) | |
(;!loc 1 11 3;) | |
(br_if $label$3 | |
(i32.eq | |
(set_local $$1 | |
(i32.add | |
(get_local $$2) | |
(i32.const 8) | |
) | |
) | |
(i32.const 72) | |
) | |
) | |
(;!bookmark .Ltmp6;) | |
(;!loc 1 12 15;) | |
(set_local $$0 | |
(f32.demote/f64 | |
(;!loc 1 12 22;) | |
(f64.mul | |
(;!loc 1 12 15;) | |
(f64.convert_s/i32 | |
(;!loc 1 12 20;) | |
(i32.load align=8 | |
(set_local $$2 | |
(i32.add | |
(get_local $$3) | |
(get_local $$2) | |
) | |
) | |
) | |
) | |
(;!bookmark main;) | |
(f64.const 0.5) | |
) | |
) | |
) | |
(;!bookmark .Ltmp7;) | |
(;!loc 1 13 12;) | |
(f32.store | |
(i32.add | |
(get_local $$2) | |
(i32.const 4) | |
) | |
(get_local $$0) | |
) | |
(set_local $$2 | |
(get_local $$1) | |
) | |
(br $label$2) | |
) | |
(;!bookmark .LBB0_6;) | |
(;!loc 1 15 22;) | |
(set_local $$0 | |
(f32.add | |
(;!loc 1 15 15;) | |
(f32.convert_s/i32 | |
(;!loc 1 15 20;) | |
(i32.load offset=8 align=8 | |
(get_local $$3) | |
) | |
) | |
(;!loc 1 15 29;) | |
(f32.load | |
(i32.add | |
(get_local $$3) | |
(i32.const 20) | |
) | |
) | |
) | |
) | |
(;!bookmark .Ltmp9;) | |
(;!loc 1 16 3;) | |
(return | |
(;!loc 1 16 10;) | |
(i32.trunc_s/f32 | |
(get_local $$0) | |
) | |
) | |
) | |
(;!dbg_section .label_sequences | |
.function main .Lfunc_begin0 .Ltmp0 .Ltmp1 .LBB0_1 .Ltmp2 .Ltmp3 .Ltmp4 .LBB0_3 .LBB0_4 .Ltmp5 .Ltmp6 .Ltmp7 .Ltmp8 .LBB0_6 .Ltmp9 .Ltmp10 .Lfunc_end0 | |
;) | |
(;!dbg_section .debug_str,"MS",@progbits,1 | |
.Linfo_string0: | |
.asciz "clang version 3.9.0 (trunk 266025)" # string offset=0 | |
.Linfo_string1: | |
.asciz "hello.c" # string offset=35 | |
.Linfo_string2: | |
.asciz "/Users/yury/llvmwasm" # string offset=43 | |
.Linfo_string3: | |
.asciz "i" # string offset=64 | |
.Linfo_string4: | |
.asciz "x" # string offset=66 | |
.Linfo_string5: | |
.asciz "int" # string offset=68 | |
.Linfo_string6: | |
.asciz "y" # string offset=72 | |
.Linfo_string7: | |
.asciz "float" # string offset=74 | |
.Linfo_string8: | |
.asciz "z" # string offset=80 | |
.Linfo_string9: | |
.asciz "main" # string offset=82 | |
.Linfo_string10: | |
.asciz "t" # string offset=87 | |
.Linfo_string11: | |
.asciz "sizetype" # string offset=89 | |
.Linfo_string12: | |
.asciz "sum" # string offset=98 | |
.Linfo_string13: | |
.asciz "j" # string offset=102 | |
;) | |
(;!dbg_section .debug_loc,"",@progbits | |
.Ldebug_loc0: | |
.int32 .Ltmp0-.Lfunc_begin0 | |
.int32 .Ltmp3-.Lfunc_begin0 | |
.int16 3 # Loc expr size | |
.int8 17 # DW_OP_consts | |
.int8 0 # 0 | |
.int8 159 # DW_OP_stack_value | |
.int32 .Ltmp3-.Lfunc_begin0 | |
.int32 .Lfunc_end0-.Lfunc_begin0 | |
.int16 1 # Loc expr size | |
.int8 150 # nop (could not find a dwarf register number) DW_OP_nop | |
.int32 0 | |
.int32 0 | |
.Ldebug_loc1: | |
.int32 .Ltmp7-.Lfunc_begin0 | |
.int32 .Lfunc_end0-.Lfunc_begin0 | |
.int16 1 # Loc expr size | |
.int8 150 # nop (could not find a dwarf register number) DW_OP_nop | |
.int32 0 | |
.int32 0 | |
.Ldebug_loc2: | |
.int32 .Ltmp9-.Lfunc_begin0 | |
.int32 .Lfunc_end0-.Lfunc_begin0 | |
.int16 1 # Loc expr size | |
.int8 150 # nop (could not find a dwarf register number) DW_OP_nop | |
.int32 0 | |
.int32 0 | |
;) | |
(;!dbg_section .debug_abbrev,"",@progbits | |
.Lsection_abbrev: | |
.int8 1 # Abbreviation Code | |
.int8 17 # DW_TAG_compile_unit | |
.int8 1 # DW_CHILDREN_yes | |
.int8 37 # DW_AT_producer | |
.int8 14 # DW_FORM_strp | |
.int8 19 # DW_AT_language | |
.int8 5 # DW_FORM_data2 | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 16 # DW_AT_stmt_list | |
.int8 23 # DW_FORM_sec_offset | |
.int8 27 # DW_AT_comp_dir | |
.int8 14 # DW_FORM_strp | |
.ascii "\341\177" # DW_AT_APPLE_optimized | |
.int8 25 # DW_FORM_flag_present | |
.int8 17 # DW_AT_low_pc | |
.int8 1 # DW_FORM_addr | |
.int8 18 # DW_AT_high_pc | |
.int8 6 # DW_FORM_data4 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 2 # Abbreviation Code | |
.int8 52 # DW_TAG_variable | |
.int8 0 # DW_CHILDREN_no | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 63 # DW_AT_external | |
.int8 25 # DW_FORM_flag_present | |
.int8 58 # DW_AT_decl_file | |
.int8 11 # DW_FORM_data1 | |
.int8 59 # DW_AT_decl_line | |
.int8 11 # DW_FORM_data1 | |
.int8 2 # DW_AT_location | |
.int8 24 # DW_FORM_exprloc | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 3 # Abbreviation Code | |
.int8 19 # DW_TAG_structure_type | |
.int8 1 # DW_CHILDREN_yes | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 11 # DW_AT_byte_size | |
.int8 11 # DW_FORM_data1 | |
.int8 58 # DW_AT_decl_file | |
.int8 11 # DW_FORM_data1 | |
.int8 59 # DW_AT_decl_line | |
.int8 11 # DW_FORM_data1 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 4 # Abbreviation Code | |
.int8 13 # DW_TAG_member | |
.int8 0 # DW_CHILDREN_no | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 58 # DW_AT_decl_file | |
.int8 11 # DW_FORM_data1 | |
.int8 59 # DW_AT_decl_line | |
.int8 11 # DW_FORM_data1 | |
.int8 56 # DW_AT_data_member_location | |
.int8 11 # DW_FORM_data1 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 5 # Abbreviation Code | |
.int8 36 # DW_TAG_base_type | |
.int8 0 # DW_CHILDREN_no | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 62 # DW_AT_encoding | |
.int8 11 # DW_FORM_data1 | |
.int8 11 # DW_AT_byte_size | |
.int8 11 # DW_FORM_data1 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 6 # Abbreviation Code | |
.int8 46 # DW_TAG_subprogram | |
.int8 1 # DW_CHILDREN_yes | |
.int8 17 # DW_AT_low_pc | |
.int8 1 # DW_FORM_addr | |
.int8 18 # DW_AT_high_pc | |
.int8 6 # DW_FORM_data4 | |
.ascii "\347\177" # DW_AT_APPLE_omit_frame_ptr | |
.int8 25 # DW_FORM_flag_present | |
.int8 64 # DW_AT_frame_base | |
.int8 24 # DW_FORM_exprloc | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 58 # DW_AT_decl_file | |
.int8 11 # DW_FORM_data1 | |
.int8 59 # DW_AT_decl_line | |
.int8 11 # DW_FORM_data1 | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 63 # DW_AT_external | |
.int8 25 # DW_FORM_flag_present | |
.ascii "\341\177" # DW_AT_APPLE_optimized | |
.int8 25 # DW_FORM_flag_present | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 7 # Abbreviation Code | |
.int8 52 # DW_TAG_variable | |
.int8 0 # DW_CHILDREN_no | |
.int8 2 # DW_AT_location | |
.int8 24 # DW_FORM_exprloc | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 58 # DW_AT_decl_file | |
.int8 11 # DW_FORM_data1 | |
.int8 59 # DW_AT_decl_line | |
.int8 11 # DW_FORM_data1 | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 8 # Abbreviation Code | |
.int8 52 # DW_TAG_variable | |
.int8 0 # DW_CHILDREN_no | |
.int8 2 # DW_AT_location | |
.int8 23 # DW_FORM_sec_offset | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 58 # DW_AT_decl_file | |
.int8 11 # DW_FORM_data1 | |
.int8 59 # DW_AT_decl_line | |
.int8 11 # DW_FORM_data1 | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 9 # Abbreviation Code | |
.int8 52 # DW_TAG_variable | |
.int8 0 # DW_CHILDREN_no | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 58 # DW_AT_decl_file | |
.int8 11 # DW_FORM_data1 | |
.int8 59 # DW_AT_decl_line | |
.int8 11 # DW_FORM_data1 | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 10 # Abbreviation Code | |
.int8 11 # DW_TAG_lexical_block | |
.int8 1 # DW_CHILDREN_yes | |
.int8 17 # DW_AT_low_pc | |
.int8 1 # DW_FORM_addr | |
.int8 18 # DW_AT_high_pc | |
.int8 6 # DW_FORM_data4 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 11 # Abbreviation Code | |
.int8 1 # DW_TAG_array_type | |
.int8 1 # DW_CHILDREN_yes | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 12 # Abbreviation Code | |
.int8 33 # DW_TAG_subrange_type | |
.int8 0 # DW_CHILDREN_no | |
.int8 73 # DW_AT_type | |
.int8 19 # DW_FORM_ref4 | |
.int8 55 # DW_AT_count | |
.int8 11 # DW_FORM_data1 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 13 # Abbreviation Code | |
.int8 36 # DW_TAG_base_type | |
.int8 0 # DW_CHILDREN_no | |
.int8 3 # DW_AT_name | |
.int8 14 # DW_FORM_strp | |
.int8 11 # DW_AT_byte_size | |
.int8 11 # DW_FORM_data1 | |
.int8 62 # DW_AT_encoding | |
.int8 11 # DW_FORM_data1 | |
.int8 0 # EOM(1) | |
.int8 0 # EOM(2) | |
.int8 0 # EOM(3) | |
;) | |
(;!dbg_section .debug_info,"",@progbits | |
.Lsection_info: | |
.Lcu_begin0: | |
.int32 219 # Length of Unit | |
.int16 4 # DWARF version number | |
.int32 .Lsection_abbrev # Offset Into Abbrev. Section | |
.int8 4 # Address Size (in bytes) | |
.int8 1 # Abbrev [1] 0xb:0xd4 DW_TAG_compile_unit | |
.int32 .Linfo_string0 # DW_AT_producer | |
.int16 12 # DW_AT_language | |
.int32 .Linfo_string1 # DW_AT_name | |
.int32 .Lline_table_start0 # DW_AT_stmt_list | |
.int32 .Linfo_string2 # DW_AT_comp_dir | |
# DW_AT_APPLE_optimized | |
.int32 .Lfunc_begin0 # DW_AT_low_pc | |
.int32 .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc | |
.int8 2 # Abbrev [2] 0x26:0x11 DW_TAG_variable | |
.int32 .Linfo_string3 # DW_AT_name | |
.int32 55 # DW_AT_type | |
# DW_AT_external | |
.int8 1 # DW_AT_decl_file | |
.int8 4 # DW_AT_decl_line | |
.int8 5 # DW_AT_location | |
.int8 3 | |
.int32 i | |
.int8 3 # Abbrev [3] 0x37:0x21 DW_TAG_structure_type | |
.int32 .Linfo_string8 # DW_AT_name | |
.int8 8 # DW_AT_byte_size | |
.int8 1 # DW_AT_decl_file | |
.int8 1 # DW_AT_decl_line | |
.int8 4 # Abbrev [4] 0x3f:0xc DW_TAG_member | |
.int32 .Linfo_string4 # DW_AT_name | |
.int32 88 # DW_AT_type | |
.int8 1 # DW_AT_decl_file | |
.int8 2 # DW_AT_decl_line | |
.int8 0 # DW_AT_data_member_location | |
.int8 4 # Abbrev [4] 0x4b:0xc DW_TAG_member | |
.int32 .Linfo_string6 # DW_AT_name | |
.int32 95 # DW_AT_type | |
.int8 1 # DW_AT_decl_file | |
.int8 3 # DW_AT_decl_line | |
.int8 4 # DW_AT_data_member_location | |
.int8 0 # End Of Children Mark | |
.int8 5 # Abbrev [5] 0x58:0x7 DW_TAG_base_type | |
.int32 .Linfo_string5 # DW_AT_name | |
.int8 5 # DW_AT_encoding | |
.int8 4 # DW_AT_byte_size | |
.int8 5 # Abbrev [5] 0x5f:0x7 DW_TAG_base_type | |
.int32 .Linfo_string7 # DW_AT_name | |
.int8 4 # DW_AT_encoding | |
.int8 4 # DW_AT_byte_size | |
.int8 6 # Abbrev [6] 0x66:0x65 DW_TAG_subprogram | |
.int32 .Lfunc_begin0 # DW_AT_low_pc | |
.int32 .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc | |
# DW_AT_APPLE_omit_frame_ptr | |
.int8 0 # DW_AT_frame_base | |
.int32 .Linfo_string9 # DW_AT_name | |
.int8 1 # DW_AT_decl_file | |
.int8 6 # DW_AT_decl_line | |
.int32 88 # DW_AT_type | |
# DW_AT_external | |
# DW_AT_APPLE_optimized | |
.int8 7 # Abbrev [7] 0x7a:0xe DW_TAG_variable | |
.int8 2 # DW_AT_location | |
.int8 145 | |
.int8 0 | |
.int32 .Linfo_string10 # DW_AT_name | |
.int8 1 # DW_AT_decl_file | |
.int8 7 # DW_AT_decl_line | |
.int32 203 # DW_AT_type | |
.int8 8 # Abbrev [8] 0x88:0xf DW_TAG_variable | |
.int32 .Ldebug_loc0 # DW_AT_location | |
.int32 .Linfo_string3 # DW_AT_name | |
.int8 1 # DW_AT_decl_file | |
.int8 8 # DW_AT_decl_line | |
.int32 88 # DW_AT_type | |
.int8 8 # Abbrev [8] 0x97:0xf DW_TAG_variable | |
.int32 .Ldebug_loc2 # DW_AT_location | |
.int32 .Linfo_string12 # DW_AT_name | |
.int8 1 # DW_AT_decl_file | |
.int8 15 # DW_AT_decl_line | |
.int32 95 # DW_AT_type | |
.int8 9 # Abbrev [9] 0xa6:0xb DW_TAG_variable | |
.int32 .Linfo_string13 # DW_AT_name | |
.int8 1 # DW_AT_decl_file | |
.int8 8 # DW_AT_decl_line | |
.int32 88 # DW_AT_type | |
.int8 10 # Abbrev [10] 0xb1:0x19 DW_TAG_lexical_block | |
.int32 .Ltmp6 # DW_AT_low_pc | |
.int32 .Ltmp8-.Ltmp6 # DW_AT_high_pc | |
.int8 8 # Abbrev [8] 0xba:0xf DW_TAG_variable | |
.int32 .Ldebug_loc1 # DW_AT_location | |
.int32 .Linfo_string3 # DW_AT_name | |
.int8 1 # DW_AT_decl_file | |
.int8 12 # DW_AT_decl_line | |
.int32 95 # DW_AT_type | |
.int8 0 # End Of Children Mark | |
.int8 0 # End Of Children Mark | |
.int8 11 # Abbrev [11] 0xcb:0xc DW_TAG_array_type | |
.int32 55 # DW_AT_type | |
.int8 12 # Abbrev [12] 0xd0:0x6 DW_TAG_subrange_type | |
.int32 215 # DW_AT_type | |
.int8 10 # DW_AT_count | |
.int8 0 # End Of Children Mark | |
.int8 13 # Abbrev [13] 0xd7:0x7 DW_TAG_base_type | |
.int32 .Linfo_string11 # DW_AT_name | |
.int8 8 # DW_AT_byte_size | |
.int8 7 # DW_AT_encoding | |
.int8 0 # End Of Children Mark | |
;) | |
(;!dbg_section .debug_ranges,"",@progbits | |
.Ldebug_range: | |
;) | |
(;!dbg_section .debug_macinfo,"",@progbits | |
.Ldebug_macinfo: | |
.Lcu_macro_begin0: | |
.int8 0 # End Of Macro List Mark | |
;) | |
(;!dbg_section .debug_pubnames,"",@progbits | |
.int32 .LpubNames_end0-.LpubNames_begin0 # Length of Public Names Info | |
.LpubNames_begin0: | |
.int16 2 # DWARF Version | |
.int32 .Lcu_begin0 # Offset of Compilation Unit Info | |
.int32 223 # Compilation Unit Length | |
.int32 102 # DIE offset | |
.asciz "main" # External Name | |
.int32 38 # DIE offset | |
.asciz "i" # External Name | |
.int32 0 # End Mark | |
.LpubNames_end0: | |
;) | |
(;!dbg_section .debug_pubtypes,"",@progbits | |
.int32 .LpubTypes_end0-.LpubTypes_begin0 # Length of Public Types Info | |
.LpubTypes_begin0: | |
.int16 2 # DWARF Version | |
.int32 .Lcu_begin0 # Offset of Compilation Unit Info | |
.int32 223 # Compilation Unit Length | |
.int32 95 # DIE offset | |
.asciz "float" # External Name | |
.int32 55 # DIE offset | |
.asciz "z" # External Name | |
.int32 88 # DIE offset | |
.asciz "int" # External Name | |
.int32 0 # End Mark | |
.LpubTypes_end0: | |
.ident "clang version 3.9.0 (trunk 266025)" | |
;) | |
(;!dbg_section .debug_line,"",@progbits | |
.Lline_table_start0: | |
;) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment