汇编:什么是语义NOP?

Ben*_*min 8 security assembly opcode

我想知道汇编中的"语义NOP"是什么?

R S*_*hko 5

代码不是实际的nop但不影响程序的行为.

在C中,以下序列可以被认为是语义NOP:

{
    // Since none of these have side affects, they are effectively no-ops
    int x = 5;
    int y = x * x;
    int z = y / x;
}
Run Code Online (Sandbox Code Playgroud)