Skip to content

Commit 76c7cfe

Browse files
committed
x86 asm: move NOP in from x86-assembly-cheat
1 parent ef4fa33 commit 76c7cfe

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

README.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12473,6 +12473,20 @@ link:userland/arch/x86_64/loop.S[LOOP]
1247312473

1247412474
Vs <<x86-jcc-instructions,Jcc>>: https://stackoverflow.com/questions/6805692/x86-assembly-programming-loops-with-ecx-and-loop-instruction-versus-jmp-jcond Holy CISC!
1247512475

12476+
=== x86 miscellaneous instructions
12477+
12478+
<<intel-manual-1>> 7.3.16 "Miscellaneous Instructions"
12479+
12480+
==== x86 NOP instruction
12481+
12482+
link:userland/arch/x86_64/nop.S[NOP]
12483+
12484+
No OPeration.
12485+
12486+
Does nothing except take up one processor cycle and occupy some instruction memory.
12487+
12488+
Applications: http://stackoverflow.com/questions/234906/whats-the-purpose-of-the-nop-opcode
12489+
1247612490
=== x86 random number generator instructions
1247712491

1247812492
<<intel-manual-1>> 5.1.15 Random Number Generator Instructions

userland/arch/x86_64/nop.S

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-nop-instruction */
2+
3+
#include <lkmc.h>
4+
5+
LKMC_PROLOGUE
6+
nop
7+
nop
8+
9+
/* Other nops
10+
* http://stackoverflow.com/questions/11910501/why-did-gcc-generate-mov-eax-eax-and-what-does-it-mean
11+
*/
12+
mov %rax, %rax
13+
LKMC_EPILOGUE

0 commit comments

Comments
 (0)