[fpc-devel] Comparison FPC 2.6.2 - Delphi 7
Michael Schnell
mschnell at lumino.de
Mon Mar 4 12:47:45 CET 2013
On 03/04/2013 12:29 PM, Tomas Hajny wrote:
> It's questionable whether it should be responsibility of a compiler to
> provide efficient support for threadvars,
If the target platform does not support threadvars a compiler can't do
it at all.
If the target platform only provides library calls, a compiler needs to
use them.
If the target platform provides dedicated pointer registers for
threadvars a compiler can use them.
In all fpc enabled patforms I examined (X86 Windows, X86 Linux, X64-64
Windows, X86-64 Linux, ARM Linux (32 Bits) the platform provides as well
library calls as dedicated threadvar pointer registers. In windows the
registers seem to be undocumented but obviously "stable", as a change
would break a lot existing C/C++ software.
All C/C++ compilers I examined used the threadvar pointer Registers for
speed..
-Michael
More information about the fpc-devel
mailing list