movq %src, %dest
leaq (%src), %dest
I think the two instructions fulfill the same purpose, copying the value of src to dest. I want to know if I'm right or if not, what the difference is between the two.
Let src = 0x100 and 0x100 = 3.
This is what I thought. The first instruction 1. movq will copy 0x100 to dest. The second instruction 2. leaq will copy the reference of 3 which is 0x100 to dest.