[fpc-devel] generate assembler with no clear purpose MOV
Marģers .
margers.roked at inbox.lv
Tue Feb 4 19:50:09 CET 2020
p.s. tested execution speed and there is no measurable difference.
> asm code
> # [109] bit:= longint(1) shl k;
> movslq %ecx,%rdx
> # Register r8d allocated
> movl $1,%r8d
> # Register edx,edx allocated
> shlx %edx,%r8d,%edx
> # Register r8d released
> # Register edx allocated
> movl %edx,%esi
> # Peephole Optimization: %esi = %edx; changed to minimise pipeline stall (MovXXX2MovXXX)
> # Peephole Optimization: Mov2Nop 4 done
> what purpose serve: movslq %ecx,%rdx ?
> movl %edx,%esi seems unnecessary,
> when just enough would be
> movl $1,%esi
> shlx %ecx,%esi,%esi
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list