// Nop sequences of various lengths.
const char nop1[1] = { 0x90 }; // nop
const char nop2[2] = { 0x66, 0x90 }; // xchg %ax %ax
- const char nop3[3] = { 0x8d, 0x76, 0x00 }; // leal 0(%esi),%esi
- const char nop4[4] = { 0x8d, 0x74, 0x26, 0x00}; // leal 0(%esi,1),%esi
- const char nop5[5] = { 0x90, 0x8d, 0x74, 0x26, // nop
- 0x00 }; // leal 0(%esi,1),%esi
- const char nop6[6] = { 0x8d, 0xb6, 0x00, 0x00, // leal 0L(%esi),%esi
+ const char nop3[3] = { 0x0f, 0x1f, 0x00 }; // nop (%rax)
+ const char nop4[4] = { 0x0f, 0x1f, 0x40, 0x00}; // nop 0(%rax)
+ const char nop5[5] = { 0x0f, 0x1f, 0x44, 0x00, // nop 0(%rax,%rax,1)
+ 0x00 };
+ const char nop6[6] = { 0x66, 0x0f, 0x1f, 0x44, // nopw 0(%rax,%rax,1)
0x00, 0x00 };
- const char nop7[7] = { 0x8d, 0xb4, 0x26, 0x00, // leal 0L(%esi,1),%esi
+ const char nop7[7] = { 0x0f, 0x1f, 0x80, 0x00, // nopl 0L(%rax)
0x00, 0x00, 0x00 };
- const char nop8[8] = { 0x90, 0x8d, 0xb4, 0x26, // nop
- 0x00, 0x00, 0x00, 0x00 }; // leal 0L(%esi,1),%esi
- const char nop9[9] = { 0x89, 0xf6, 0x8d, 0xbc, // movl %esi,%esi
- 0x27, 0x00, 0x00, 0x00, // leal 0L(%edi,1),%edi
+ const char nop8[8] = { 0x0f, 0x1f, 0x84, 0x00, // nopl 0L(%rax,%rax,1)
+ 0x00, 0x00, 0x00, 0x00 };
+ const char nop9[9] = { 0x66, 0x0f, 0x1f, 0x84, // nopw 0L(%rax,%rax,1)
+ 0x00, 0x00, 0x00, 0x00,
0x00 };
- const char nop10[10] = { 0x8d, 0x76, 0x00, 0x8d, // leal 0(%esi),%esi
- 0xbc, 0x27, 0x00, 0x00, // leal 0L(%edi,1),%edi
+ const char nop10[10] = { 0x66, 0x2e, 0x0f, 0x1f, // nopw %cs:0L(%rax,%rax,1)
+ 0x84, 0x00, 0x00, 0x00,
0x00, 0x00 };
- const char nop11[11] = { 0x8d, 0x74, 0x26, 0x00, // leal 0(%esi,1),%esi
- 0x8d, 0xbc, 0x27, 0x00, // leal 0L(%edi,1),%edi
+ const char nop11[11] = { 0x66, 0x66, 0x2e, 0x0f, // data16
+ 0x1f, 0x84, 0x00, 0x00, // nopw %cs:0L(%rax,%rax,1)
0x00, 0x00, 0x00 };
- const char nop12[12] = { 0x8d, 0xb6, 0x00, 0x00, // leal 0L(%esi),%esi
- 0x00, 0x00, 0x8d, 0xbf, // leal 0L(%edi),%edi
+ const char nop12[12] = { 0x66, 0x66, 0x66, 0x2e, // data16; data16
+ 0x0f, 0x1f, 0x84, 0x00, // nopw %cs:0L(%rax,%rax,1)
0x00, 0x00, 0x00, 0x00 };
- const char nop13[13] = { 0x8d, 0xb6, 0x00, 0x00, // leal 0L(%esi),%esi
- 0x00, 0x00, 0x8d, 0xbc, // leal 0L(%edi,1),%edi
- 0x27, 0x00, 0x00, 0x00,
+ const char nop13[13] = { 0x66, 0x66, 0x66, 0x66, // data16; data16; data16
+ 0x2e, 0x0f, 0x1f, 0x84, // nopw %cs:0L(%rax,%rax,1)
+ 0x00, 0x00, 0x00, 0x00,
0x00 };
- const char nop14[14] = { 0x8d, 0xb4, 0x26, 0x00, // leal 0L(%esi,1),%esi
- 0x00, 0x00, 0x00, 0x8d, // leal 0L(%edi,1),%edi
- 0xbc, 0x27, 0x00, 0x00,
+ const char nop14[14] = { 0x66, 0x66, 0x66, 0x66, // data16; data16; data16
+ 0x66, 0x2e, 0x0f, 0x1f, // data16
+ 0x84, 0x00, 0x00, 0x00, // nopw %cs:0L(%rax,%rax,1)
0x00, 0x00 };
- const char nop15[15] = { 0xeb, 0x0d, 0x90, 0x90, // jmp .+15
- 0x90, 0x90, 0x90, 0x90, // nop,nop,nop,...
- 0x90, 0x90, 0x90, 0x90,
- 0x90, 0x90, 0x90 };
+ const char nop15[15] = { 0x66, 0x66, 0x66, 0x66, // data16; data16; data16
+ 0x66, 0x66, 0x2e, 0x0f, // data16; data16
+ 0x1f, 0x84, 0x00, 0x00, // nopw %cs:0L(%rax,%rax,1)
+ 0x00, 0x00, 0x00 };
const char* nops[16] = {
NULL,