Created
October 14, 2011 20:25
-
-
Save ziotom78/1288231 to your computer and use it in GitHub Desktop.
Assembly code produced by GCC 4.2.1 for the "doubleThis" function (with reference parameter)
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
__Z24doubleThisRd: | |
pushq %rbp | |
movq %rsp, %rbp | |
movq %rdi, -8(%rbp) | |
movq -8(%rbp), %rax | |
movsd (%rax), %xmm0 # Put in xmm0 the value pointed by RAX | |
addsd %xmm0, %xmm0 # Calculate x+x instead of 2x | |
leave | |
ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment