[fpc-devel] SSE in FPC

Dariusz Mazur darekm at emadar.com
Sat Nov 29 18:35:08 CET 2008


Mattias Gaertner pisze:
> On Fri, 28 Nov 2008 21:25:16 +0100
> darekm <darekm at emadar.com> wrote:
>
>   
>> Hi
>>
>>   Are in FPC some  instruction set contains streaming SIMD (SSE) like
>> in GCC:
>>
>> http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/X86-Built_002din-Functions.html
>>
>>  or in Microsoft Visual
>>
>> http://msdn.microsoft.com/en-us/library/kcwz153a(VS.80).aspx
>>     
>
> Use the mmx unit to discover what mmx/sse instruction set is supported
> by your cpu. You can use mmx/sse commands directly in the asm
> blocks and FPC automatically uses MMX/SSE instructions for your pascal
> code if you allow it (specify CPU type). In my experiments FPC often
> created faster code itself. So don't expect much speed gain when using
> SSE instructions directly.
>   
MMX can operate on 2 longint simultaneous and SSE on 4,
FPC often sometime make optimization to SSE, thus is faster.

I don't want write SSE instruction by hand, but would by nice to to tell 
to compiler, where those optimization should be made (if its possible)


Darek





More information about the fpc-devel mailing list