Skip to content

Instantly share code, notes, and snippets.

@ziotom78
Created October 14, 2011 20:18
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ziotom78/1288208 to your computer and use it in GitHub Desktop.
Assembly output of GCC 4.2.1 for the "doubleThis" function
__Z11doubleThisd:
pushq %rbp
movq %rsp, %rbp
movsd %xmm0, -8(%rbp)
movsd -8(%rbp), %xmm0 # Directly copy the parameter into the FP register
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