/
loop-scalar.s
107 lines (106 loc) · 2.81 KB
/
loop-scalar.s
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
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 10, 15 sdk_version 10, 15
.globl _loop1 ## -- Begin function loop1
.p2align 4, 0x90
_loop1: ## @loop1
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl %edi, -4(%rbp)
movq %rsi, -16(%rbp)
movl $0, -20(%rbp)
movl $0, -24(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -24(%rbp), %eax
cmpl -4(%rbp), %eax
jge LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -24(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl -20(%rbp), %edx
movl %edx, -20(%rbp)
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
jmp LBB0_1
LBB0_4:
movl -20(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _loop2 ## -- Begin function loop2
.p2align 4, 0x90
_loop2: ## @loop2
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl %edi, -4(%rbp)
movq %rsi, -16(%rbp)
movq %rdx, -24(%rbp)
movl $0, -28(%rbp)
LBB1_1: ## =>This Inner Loop Header: Depth=1
cmpl $160, -28(%rbp)
jge LBB1_4
## %bb.2: ## in Loop: Header=BB1_1 Depth=1
movq -16(%rbp), %rax
movslq -28(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
addl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
## %bb.3: ## in Loop: Header=BB1_1 Depth=1
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB1_1
LBB1_4:
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _loop3 ## -- Begin function loop3
.p2align 4, 0x90
_loop3: ## @loop3
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movl $0, -12(%rbp)
movl $0, -16(%rbp)
LBB2_1: ## =>This Inner Loop Header: Depth=1
cmpl $160, -16(%rbp)
jge LBB2_4
## %bb.2: ## in Loop: Header=BB2_1 Depth=1
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl -12(%rbp), %edx
movl %edx, -12(%rbp)
## %bb.3: ## in Loop: Header=BB2_1 Depth=1
movl -16(%rbp), %eax
addl $1, %eax
movl %eax, -16(%rbp)
jmp LBB2_1
LBB2_4:
movl -12(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols