[fpc-devel] Question about NOP instructions

Florian Klaempfl florian at freepascal.org
Sun Nov 3 11:44:59 CET 2019


Am 02.11.2019 um 15:08 schrieb J. Gareth Moreton:
> Hi everyone,
> 
> During my optimisation travels, I frequently stumble across lone NOP
> instructions in the compiled assembly language.  Normally I leave these
> alone, but occasionally I stumble across things like this:
> 
>     ...
>     movq    $0,24(%rbx)
> .Lj1859:
>     nop
> .Lj1858:
>     movq    %rbp,%rcx
>     ...
> 

Can you please post the complete code? Without it, it's hard to say

> And there are jumps elsewhere that go to one label or the other. Is
> there any reason why a jump should lead to the NOP, or can they all be
> redirected to after the NOP instruction?

Some are the result of exception handling on x86_64-win64, see
compiler/x86_64/nx64flw.pas


More information about the fpc-devel mailing list