[fpc-devel] OO rewrite - technical questions

Sven Barth pascaldragon at googlemail.com
Mon Jul 26 11:41:32 CEST 2010


Hi!

Am 26.07.2010 11:22, schrieb Michael Schnell:
> Maybe Win64 uses some "Selector" mechanism (similar as ) so that there
> are no different Selector-Register values in different threads.

Win64 uses GS instead of FS for the TEB and everything else stays the 
same. In fact FS and GS (and to some extend CS) are the only selectors 
actively used by the x86_64 platform, but - if I understand that 
correctly - they can only be set up from ring 0 code (thus: kernel 
code), which normally happens during context switches so that the data 
of the current thread's TEB is available again.

The usage of the FS and GS selectors in 64bit is also described in AMD's 
manual: e.g http://support.amd.com/us/Processor_TechDocs/24592.pdf 2.1.2 
Segment Registers

Regards,
Sven



More information about the fpc-devel mailing list