diff --git a/README.adoc b/README.adoc index acadc49..1890029 100644 --- a/README.adoc +++ b/README.adoc @@ -12473,6 +12473,20 @@ link:userland/arch/x86_64/loop.S[LOOP] Vs <>: https://stackoverflow.com/questions/6805692/x86-assembly-programming-loops-with-ecx-and-loop-instruction-versus-jmp-jcond Holy CISC! +=== x86 miscellaneous instructions + +<> 7.3.16 "Miscellaneous Instructions" + +==== x86 NOP instruction + +link:userland/arch/x86_64/nop.S[NOP] + +No OPeration. + +Does nothing except take up one processor cycle and occupy some instruction memory. + +Applications: http://stackoverflow.com/questions/234906/whats-the-purpose-of-the-nop-opcode + === x86 random number generator instructions <> 5.1.15 Random Number Generator Instructions diff --git a/userland/arch/x86_64/nop.S b/userland/arch/x86_64/nop.S new file mode 100644 index 0000000..16a1960 --- /dev/null +++ b/userland/arch/x86_64/nop.S @@ -0,0 +1,13 @@ +/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-nop-instruction */ + +#include + +LKMC_PROLOGUE + nop + nop + + /* Other nops + * http://stackoverflow.com/questions/11910501/why-did-gcc-generate-mov-eax-eax-and-what-does-it-mean + */ + mov %rax, %rax +LKMC_EPILOGUE