Intel 64 and IA-32 Architectures Software Developers Manual Volume 2A, Instruction Set Reference, A-M

3-522 Vol. 2
INSTRUCTION SET REFERENCE, A-M
LDS/LES/LFS/LGS/LSS—Load Far Pointer
Description
Loads a far pointer (segment selector and offset) from the second operand (source
operand) into a segment register and the first operand (destination operand). The
source operand specifies a 48-bit or a 32-bit pointer in memory depending on the
current setting of the operand-size attribute (32 bits or 16 bits, respectively). The
instruction opcode and the destination operand specify a segment register/general-
purpose register pair. The 16-bit segment selector from the source operand is loaded
into the segment register specified with the opcode (DS, SS, ES, FS, or GS). The
32-bit or 16-bit offset is loaded into the register specified with the destination
operand.
Opcode Instruction
64-Bit
Mode
Compat/
Leg Mode Description
C5 /r LDS
r16,m16:16
Invalid Valid Load DS:r16 with far pointer from
memory.
C5 /r LDS
r32,m16:32
Invalid Valid Load DS:r32 with far pointer from
memory.
0F B2 /r LSS
r16,m16:16
Valid Valid Load SS:r16 with far pointer from
memory.
0F B2 /r LSS
r32,m16:32
Valid Valid Load SS:r32 with far pointer from
memory.
REX + 0F B2
/r
LSS
r64,m16:64
Valid N.E. Load SS:r64 with far pointer from
memory.
C4 /r LES
r16,m16:16
Invalid Valid Load ES:r16 with far pointer from
memory.
C4 /r LES
r32,m16:32
Invalid Valid Load ES:r32 with far pointer from
memory.
0F B4 /r LFS
r16,m16:16
Valid Valid Load FS:r16 with far pointer from
memory.
0F B4 /r LFS
r32,m16:32
Valid Valid Load FS:r32 with far pointer from
memory.
REX + 0F B4
/r
LFS
r64,m16:64
Valid N.E. Load FS:r64 with far pointer from
memory.
0F B5 /r LGS
r16,m16:16
Valid Valid Load GS:r16 with far pointer from
memory.
0F B5 /r LGS
r32,m16:32
Valid Valid Load GS:r32 with far pointer from
memory.
REX + 0F B5
/r
LGS
r64,m16:64
Valid N.E. Load GS:r64 with far pointer from
memory.