13.07.2015 Views

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

24594 Rev. 3.10 February 2005 AMD64 TechnologyLDSLESLFSLGSLSSLoad Far PointerLoads a far pointer from a memory location (second oper<strong>and</strong>) into a segment register(mnemonic) <strong>and</strong> general-purpose register (first oper<strong>and</strong>). The instruction stores the16-bit segment selector of the pointer into the segment register <strong>and</strong> the 16-bit or 32-bit offset portion into the general-purpose register. The oper<strong>and</strong>-size attributedetermines whether the pointer is 32-bit or 48-bit.These instructions load associated segment-descriptor information into the hiddenportion of the specified segment register.Using LDS or LES in 64-bit mode generates an invalid-opcode exception.Executing LFS, LGS, or LSS with a 64-bit oper<strong>and</strong> size only loads a 32-bit generalpurpose register <strong>and</strong> the specified segment register.Mnemonic Opcode DescriptionLDS reg16, mem16:16 C5 /rLDS reg32, mem16:32 C5 /rLES reg16, mem16:16 C4 /rLES reg32, mem16:32 C4 /rLoad DS:reg16 with a far pointer from memory.(Invalid in 64-bit mode.)Load DS:reg32 with a far pointer from memory.(Invalid in 64-bit mode.)Load ES:reg16 with a far pointer from memory.(Invalid in 64-bit mode.)Load ES:reg32 with a far pointer from memory.(Invalid in 64-bit mode.)LFS reg16, mem16:16 0F B4 /r Load FS:reg16 with a far pointer from memory.LFS reg32, mem16:32 0F B4 /r Load FS:reg32 with a far pointer from memory.LGS reg16, mem16:16 0F B5 /r Load GS:reg16 with a far pointer from memory.LGS reg32, mem16:32 0F B5 /r Load GS:reg32 with a far pointer from memory.LSS reg16, mem16:16 0F B2 /r Load SS:reg16 with a far pointer from memory.LSS reg32, mem16:32 0F B2 /r Load SS:reg32 with a far pointer from memory.LxS 179

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!