mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
x86 asm: move NOP in from x86-assembly-cheat
This commit is contained in:
14
README.adoc
14
README.adoc
@@ -12473,6 +12473,20 @@ link:userland/arch/x86_64/loop.S[LOOP]
|
||||
|
||||
Vs <<x86-jcc-instructions,Jcc>>: https://stackoverflow.com/questions/6805692/x86-assembly-programming-loops-with-ecx-and-loop-instruction-versus-jmp-jcond Holy CISC!
|
||||
|
||||
=== x86 miscellaneous instructions
|
||||
|
||||
<<intel-manual-1>> 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
|
||||
|
||||
<<intel-manual-1>> 5.1.15 Random Number Generator Instructions
|
||||
|
||||
13
userland/arch/x86_64/nop.S
Normal file
13
userland/arch/x86_64/nop.S
Normal file
@@ -0,0 +1,13 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-nop-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user