I noticed a strange usage of mov
instruction by gcc in which the source and destination operand were the same.
mov edi, edi
Code: https://godbolt.org/z/kANkNL
Note that clang also generates a mov
instruction, but moves data from edi to eax. (which is also not obvious to me. Why use eax register at all? It is a void function).
What's the purpose of this mov
instruction?