[fpc-devel] OO rewrite - technical questions

Nikolai Zhubr n-a-zhubr at yandex.ru
Sat Jul 24 16:13:06 CEST 2010

24.07.2010 17:16, Florian Klämpfl:
> Am 24.07.2010 13:42, schrieb Nikolai Zhubr:
>> use them to implement this "special management" so as exceptions and
>> threadvars can be actually used without explicitely using OS APIs.
> Delphi does not use a segment register for threadvar handling but OS calls.

For a library - yes, you are right (My memory doesn't serve me good)
However, for an ordinary application - no:

   a: longint;
   b: longint;
   a := 1;
         mov    ebx,00000001
   b := a;
         call   @GetTls
         mov    [eax+00000004],ebx

where GetTls in case of an ordinary application (not dll) is just this:

         MOV     EAX,TlsIndex
         MOV     EDX,FS:tlsArray
         MOV     EAX,[EDX+EAX*4]

> _______________________________________________
> 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