x86_64::instructions

Function nop

Source
pub fn nop()
Expand description

Executes the nop instructions, which performs no operation (i.e. does nothing).

This operation is useful to work around the LLVM bug that endless loops are illegally optimized away (see the issue). By invoking this instruction (which is marked as volatile), the compiler should no longer optimize the endless loop away.