News for hackers. Stuff that matters.
Re:x86-64 Assembly Language Programming with Ubuntu by msla on Friday August 31, 2018 @01:04PM (#17887161)
> It turns out that xor eax, eax is assigned to opcode 0x90, which is better known to most people as NOP.

This can't be true, since xoring a register with itself zeroes that register, and zeroing a register can't possibly be a general NOP instruction.

XOR also sets flags, another thing NOPs can't do.

Re:x86-64 Assembly Language Programming with Ubuntu by simcop2387 on Friday August 31, 2018 @03:59PM (#17888272)
That's because it's actually xchg eax, eax not xor eax, eax.
Re:x86-64 Assembly Language Programming with Ubuntu by CalChris on Friday August 31, 2018 @04:07PM (#17888308)
xor eax,eax is a zero (or dependency breaking) idiom. Zero idioms are detected and removed by the renamer. So they have no execution latency.