What is the best way to set a register to zero in x86 assembly: xor, mov or and?
All the following instructions do the same thing: set %eax
to zero. Which way is optimal (requiring fewest machine cycles)?
xorl %eax, %eax
mov $0, %eax
andl $0, %eax