file llvm_test cpp section text startup ax progbits align 16 0x90 type

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
.file "llvm_test.cpp"
.section .text.startup,"ax",@progbits
.align 16, 0x90
.type __cxx_global_var_init,@function
__cxx_global_var_init: # @__cxx_global_var_init
.cfi_startproc
# BB#0:
pushq %rbp
.Ltmp2:
.cfi_def_cfa_offset 16
.Ltmp3:
.cfi_offset %rbp, -16
movq %rsp, %rbp
.Ltmp4:
.cfi_def_cfa_register %rbp
subq $16, %rsp
leaq _ZStL8__ioinit, %rdi
callq _ZNSt8ios_base4InitC1Ev
leaq _ZNSt8ios_base4InitD1Ev, %rdi
leaq _ZStL8__ioinit, %rsi
leaq __dso_handle, %rdx
callq __cxa_atexit
movl %eax, -4(%rbp) # 4-byte Spill
addq $16, %rsp
popq %rbp
ret
.Ltmp5:
.size __cxx_global_var_init, .Ltmp5-__cxx_global_var_init
.cfi_endproc
.text
.globl main
.align 16, 0x90
.type main,@function
main: # @main
.cfi_startproc
# BB#0:
pushq %rbp
.Ltmp8:
.cfi_def_cfa_offset 16
.Ltmp9:
.cfi_offset %rbp, -16
movq %rsp, %rbp
.Ltmp10:
.cfi_def_cfa_register %rbp
subq $64, %rsp
leaq _ZSt4cout, %rdi
leaq .L.str, %rsi
movl $0, -4(%rbp)
callq _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
movl $100000000, %esi # imm = 0x5F5E100
movq %rax, %rdi
callq _ZNSolsEi
leaq _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_, %rsi
movq %rax, %rdi
callq _ZNSolsEPFRSoS_E
movq %rax, -40(%rbp) # 8-byte Spill
callq clock
movq %rax, -16(%rbp)
movl $0, -20(%rbp)
.LBB1_1: # =>This Inner Loop Header: Depth=1
cmpl $100000000, -20(%rbp) # imm = 0x5F5E100
jge .LBB1_4
# BB#2: # in Loop: Header=BB1_1 Depth=1
#APP
mul %ebx
#NO_APP
# BB#3: # in Loop: Header=BB1_1 Depth=1
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp .LBB1_1
.LBB1_4:
callq clock
leaq _ZSt4cout, %rdi
movabsq $1000000, %rcx # imm = 0xF4240
cvtsi2sdq %rcx, %xmm0
subq -16(%rbp), %rax
movq %rax, -32(%rbp)
cvtsi2sdq -32(%rbp), %xmm1
divsd %xmm0, %xmm1
movaps %xmm1, %xmm0
callq _ZNSolsEd
leaq .L.str1, %rsi
movq %rax, %rdi
callq _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
leaq _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_, %rsi
movq %rax, %rdi
callq _ZNSolsEPFRSoS_E
leaq _ZSt4cout, %rdi
movq -32(%rbp), %rsi
movq %rax, -48(%rbp) # 8-byte Spill
callq _ZNSolsEl
leaq .L.str2, %rsi
movq %rax, %rdi
callq _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
leaq _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_, %rsi
movq %rax, %rdi
callq _ZNSolsEPFRSoS_E
movl $0, %edx
movq %rax, -56(%rbp) # 8-byte Spill
movl %edx, %eax
addq $64, %rsp
popq %rbp
ret
.Ltmp11:
.size main, .Ltmp11-main
.cfi_endproc
.section .text.startup,"ax",@progbits
.align 16, 0x90
.type _GLOBAL__I_a,@function
_GLOBAL__I_a: # @_GLOBAL__I_a
.cfi_startproc
# BB#0:
pushq %rbp
.Ltmp14:
.cfi_def_cfa_offset 16
.Ltmp15:
.cfi_offset %rbp, -16
movq %rsp, %rbp
.Ltmp16:
.cfi_def_cfa_register %rbp
callq __cxx_global_var_init
popq %rbp
ret
.Ltmp17:
.size _GLOBAL__I_a, .Ltmp17-_GLOBAL__I_a
.cfi_endproc
.type _ZStL8__ioinit,@object # @_ZStL8__ioinit
.local _ZStL8__ioinit
.comm _ZStL8__ioinit,1,1
.type .L.str,@object # @.str
.section .rodata.str1.1,"aMS",@progbits,1
.L.str:
.asciz "Iteration counts = "
.size .L.str, 20
.type .L.str1,@object # @.str1
.L.str1:
.asciz " seconds spent"
.size .L.str1, 15
.type .L.str2,@object # @.str2
.L.str2:
.asciz " clock tick counts"
.size .L.str2, 19
.section .init_array,"aw",@init_array
.align 8
.quad _GLOBAL__I_a
.section ".note.GNU-stack","",@progbits