5 ms·
Maybe because they come after DS and ES.
by Narishma 7y ago
Maybe because they come after DS and ES.
- rzzzt 7y agoCS, DS and ES also have letters in alphabetical order, yet they are treated as acronyms. Wondering why is there no meaning (even if fabricated) attached to FS and GS?
- rwmj 7y agoNot really sure what your question means, but originally CS for "code segment", DS for "data segment" and SS for "stack segment" had distinct use cases. They weren't general purpose segment registers at all. ES was an "extra" data segment register. When FS and GS were added later the alphabetical ordering of CS, DS, ES, FS, GS was natural (with SS still being the odd one out).
- gmueckl 7y agoEven in 32 bit mode, x86 uses segmented menory access and CS, DS and SS retain their roles as default segments for code, data and stack memory accesses. IIRC, all the segment registers are special because the CPU caches the corresponding segment table entry transparently in the background. The table entries are fairly complex.
- iforgotpassword 7y agoThat's how we got virtualization on x86. When AMD killed segmentation in AMD64, VMware et al cried out loud. AMD reintroduced segmentation after that as a stop-gap solution, but then we got VTx and SVM which are a much better solution anyways.
- rzzzt 7y agoPrecisely what you wrote: CS is "Code Segment", DS is "Data Segment", ES is "Extra Segment" (even here it feels a bit manufactured), but FS and GS lack any semi-reasonable expansion.
- masklinn 7y agoBecause the purpose of FS and GS was not specifically defined at the hardware level, they're segment registers but not specific purpose. And I guess the complete lack of dedicated purpose of FS and GS is why x64 keeps them available.
- psychoslave 7y agoSo, are they faint and generic segments? :D
- anticensor 7y agoFS: all-Function Segment GS: General-purpose Segment