Intel 253666-024US Computer Hardware User Manual


 
3-530 Vol. 2A LDS/LES/LFS/LGS/LSS—Load Far Pointer
INSTRUCTION SET REFERENCE, A-M
If one of these instructions is executed in protected mode, additional information
from the segment descriptor pointed to by the segment selector in the source
operand is loaded in the hidden part of the selected segment register.
Also in protected mode, a NULL selector (values 0000 through 0003) can be loaded
into DS, ES, FS, or GS registers without causing a protection exception. (Any subse-
quent reference to a segment whose corresponding segment register is loaded with
a NULL selector, causes a general-protection exception (#GP) and no memory refer-
ence to the segment occurs.)
In 64-bit mode, the instruction’s default operation size is 32 bits. Using a REX prefix
in the form of REX.W promotes operation to specify a source operand referencing an
80-bit pointer (16-bit selector, 64-bit offset) in memory. Using a REX prefix in the
form of REX.R permits access to additional registers (R8-R15). See the summary
chart at the beginning of this section for encoding data and limits.
Operation
64-BIT_MODE
IF SS is loaded
THEN
IF SegmentSelector
= NULL and ( (RPL = 3) or
(RPL
3 and RPL CPL) )
THEN #GP(0);
ELSE IF descriptor is in non-canonical space
THEN #GP(0); FI;
ELSE IF Segment selector index is not within descriptor table limits
or segment selector RPL
CPL
or access rights indicate nonwritable data segment
or DPL
CPL
THEN #GP(selector); FI;
ELSE IF Segment marked not present
THEN #SS(selector); FI;
FI;
SS SegmentSelector(SRC);
SS SegmentDescriptor([SRC]);
ELSE IF attempt to load DS, or ES
THEN #UD;
ELSE IF FS, or GS is loaded with non-NULL segment selector
THEN IF Segment selector index is not within descriptor table limits
or access rights indicate segment neither data nor readable code segment
or segment is data or nonconforming-code segment
and ( RPL > DPL or CPL > DPL)
THEN #GP(selector); FI;
ELSE IF Segment marked not present
THEN #NP(selector); FI;