Skip to content

Commit 5505ed5

Browse files
author
hanwen.chang
committed
remove reduce instructions
1 parent 065356e commit 5505ed5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

22.s

+7-3
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,14 @@ add_sum:
4242
movq -24(%rbp), %rdx #rdx =arg0
4343
movq -32(%rbp), %rax #rax = arg1
4444
addq %rdx, %rax #add arg0,arg1 to rax
45-
movq %rax, -8(%rbp) #*(rbp-8) = rax
45+
46+
movq %rax,%rcx
47+
48+
#movq %rax, -8(%rbp) #*(rbp-8) = rax
4649
movq -40(%rbp), %rax #rax = arg2
47-
movq -8(%rbp), %rdx #rdx = *(rbp-8)
48-
movq %rdx, (%rax) #*rax=rdx
50+
#movq -8(%rbp), %rdx #rdx = *(rbp-8)
51+
movq %rcx, (%rax) #*rax=rdx
52+
## movq %rax, -40(%rbp)
4953
nop
5054
popq %rbp
5155
.cfi_def_cfa 7, 8

0 commit comments

Comments
 (0)