On 07/24/2010 03:16 PM, Florian Klämpfl wrote:

Delphi does not use a segment register for threadvar handling but OS calls.
sorry but this is not true

Turbo Delphi:

code:

var test integer;
threadvar threadtest: integer;

  test := 1;
  threadtest := 2;

compiles to

 mov [$...], $1

 call @GetTls
 mov [eax+$34], $2

with

@GetTLS resulting in (this is not exactly the original code, which in fact reads a zero form some location to EAX and uses it)


 mov edx, fs:[4]
 mov eax, [edx]
 ret


-Michael






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

Reply via email to