Skip to content

Instantly share code, notes, and snippets.

@ziotom78
Created October 14, 2011 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ziotom78/1288231 to your computer and use it in GitHub Desktop.
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)
__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