M$ C on Win32 (X86/32), using Visual Studio.


declspec(thread) int ithread;

  ithread = 1;


results in

 mov eax, dword ptr [__tls_index (417328h) ]
 mov ecx, dword ptr fs:[2Ch]
 mov edx, dword ptr [ecx,+eax*4]
 mov dword pth[edx+104h],1

This is essentially the same code as with Delphi. Supposedly as with Delphi [__tls_index (417328h) ] is always 0 with normal applications. (no idea what this is useful for)

-Michael


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to