[fpc-devel] Detecting SSE and AVX compiler options

Sven Barth pascaldragon at googlemail.com
Sun Feb 3 11:12:50 CET 2019

Am So., 3. Feb. 2019, 07:28 hat J. Gareth Moreton <gareth at moreton-family.com>

> As an example of a function that can benefit from a speed-up under
> x86_64... the floor() and floor64() functions:
> function floor64(x: float): Int64;
>   begin
>     Result:=Trunc(x)-ord(Frac(x)<0);
>   end;

Please keep in mind that for non-Win64 x86_64 targets the default floating
point type is Extended and thus you can't simply use SSE functions for many
of the Math routines as that would reduce their precision (the x87 is used
there by design). Only if some SSE version supports 128-bit floating point
that could be used (I did not check, so I can't tell).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190203/355af227/attachment.html>

More information about the fpc-devel mailing list