[fpc-devel] SSE in FPC

Alain Michaud Alain.Michaud at nrc-cnrc.gc.ca
Wed Dec 10 00:36:41 CET 2008


Hi,

   Not exactly related to this thread, but worth mentioning:

   Some time ago I was interested in (numerical) computing some Bessel 
function to the highest precision!

     I looked at MMX, SSE, SSE2, SSE3, SSE4, FP87, 3D-something  etc... 
   And all that jazz...

    It turns out that only the "old" FP87 (FPU)  has the 80 bit 
(extended) floating format!  Anything else, and you are limited to the 
64 bit (double) floating numbers.

    I fell sorry to see that even 25 years after the original 8087, 
modern CPUs are not even capable to have the same precision!


Alain


Dariusz Mazur wrote:
> 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
> 
> 
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel



More information about the fpc-devel mailing list