[fpc-devel] FPC Performance: MOVAPD vs MOVSD

Sergei Gorelkin sergei_gorelkin at mail.ru
Wed Oct 19 16:13:07 CEST 2011


19.10.2011 17:45, Graeme Geldenhuys пишет:
>
> Not that I understand much of the assembler generated, but what I did
> notice is that Delphi XE2 64-bit uses the MOVAPD function (introduced in
> SSE2 [1]), but even if I specify -O3 -CfSSE3 with 64-bit FPC, FPC only
> uses the MOVSD (introduced in 386 [2]).
>
> So is there place for optimizing FPC a bit more? Reducing the number of
> instructions and using faster / newer assembler calls?
>
There are actually two different instructions called MOVSD, one for string manipulations, another 
one is SSE2. Another such ambiguous instruction is CMPSD. This causes some confusion, and the wiki 
page [2] contains a note on that.
The MOVSD instruction used by FPC is the from the SSE2 family, as well as MOVAPD, and has nothing to 
do with 386.

Regards,
Sergei



More information about the fpc-devel mailing list