[fpc-devel] FPC for Linux-ARM

Florian Klaempfl florian at freepascal.org
Thu Jan 20 11:10:43 CET 2011


Am 20.01.2011 11:01, schrieb Bernd Mueller:
> Henry Vermaak wrote:
>> On 20/01/11 08:20, Michael Schnell wrote:
>>> On 01/19/2011 05:13 PM, Henry Vermaak wrote:
>>>>
>>>> it's really expensive to trap the illegal instructions and emulate
>>>> them.
>>> AFAIK, the trapping is done by the ARM CPU, anyway, providing the
>>> emulation functions just costs some memory, but of course it's even
>>> slower and more intrusive than directly calling an FPU emulation
>>> function in user space.
>>
>> No, the cpu generates an exception for every illegal fpu operation,
>> which gets trapped by the kernel.  The kernel then has to catch this
>> instruction and perform it by emulating the _whole_ fpu.  This,
>> together with the exception handling causes the bad performance.  Look
>> at the code in arch/arm/nwfpe if you're interested.
> 
> three years ago, I compared an OABI kernel with double precision
> Netwinder FPE emulation against softfloat and the softfloat variant was
> about 2 until 10 times faster, depending on the floating point
> instructions.

The trapping is done in hardware but it still takes a lot of time, it's
a context switch after all.



More information about the fpc-devel mailing list