Do you expect him to deploy a loop of 1000 nop s? I did a quick test with gcc and I don't see (one) nop disappears:
xorl %eax, %eax .p2align 4,,7 .L2:
With gcc -S -O3 -funroll-all-loops I see that it loops 8 times (thus, 8 nop ), but I think that if you need 1000, this will be the easiest to do:
#define NOP10() asm("nop;nop;nop;nop;nop;nop;nop;nop;nop;nop")
And then use NOP10(); ... NOP10(); ...
source share