-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloop1.s
More file actions
64 lines (64 loc) · 1.09 KB
/
Copy pathloop1.s
File metadata and controls
64 lines (64 loc) · 1.09 KB
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
.file "lab9_program.c"
.text
.section .rodata
.LC1:
.string "Seconds = %f\n"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
subq $32, %rsp
movl $268435456, -24(%rbp)
movl $0, -20(%rbp)
movl -20(%rbp), %eax
movl %eax, -32(%rbp)
call clock@PLT
movq %rax, -16(%rbp)
movl $0, -28(%rbp)
jmp .L2
.L3:
addl $1, -32(%rbp)
addl $1, -32(%rbp)
addl $1, -28(%rbp)
.L2:
movl -28(%rbp), %eax
cmpl -24(%rbp), %eax
jl .L3
call clock@PLT
movq %rax, -8(%rbp)
pxor %xmm0, %xmm0
cvtsi2sdq -8(%rbp), %xmm0
pxor %xmm1, %xmm1
cvtsi2sdq -16(%rbp), %xmm1
subsd %xmm1, %xmm0
movsd .LC0(%rip), %xmm1
divsd %xmm1, %xmm0
movq %xmm0, %rax
movq %rax, %xmm0
leaq .LC1(%rip), %rax
movq %rax, %rdi
movl $1, %eax
call printf@PLT
movl -32(%rbp), %edx
movl -20(%rbp), %eax
addl %edx, %eax
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size main, .-main
.section .rodata
.align 8
.LC0:
.long 0
.long 1093567616
.ident "GCC: (GNU) 13.2.1 20230801"
.section .note.GNU-stack,"",@progbits