Intel ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 Manual page 1587

Hide thumbs Also See for ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3:
Table of Contents

Advertisement

MOV—Move (Continued)
If the destination operand is a segment register (DS, ES, FS, GS, or SS), the source
operand must be a valid segment selector. In protected mode, moving a segment
selector into a segment register automatically causes the segment descriptor
information associated with that segment selector to be loaded into the hidden
(shadow) part of the segment register. While loading this information, the segment
selector and segment descriptor information is validated (see the "Operation" algorithm
below). The segment descriptor data is obtained from the GDT or LDT entry for the
specified segment selector.
A null segment selector (values 0000-0003) can be loaded into the DS, ES, FS, and GS
registers without causing a protection exception. However, any subsequent attempt to
reference a segment whose corresponding segment register is loaded with a null value
causes a general protection exception (#GP) and no memory reference occurs.
Loading the SS register with a MOV instruction inhibits all external interrupts
and traps until after the execution of the next instruction in the IA-32 System
Environment. For the Itanium System Environment, MOV to SS results in a
IA-32_Intercept(SystemFlag) trap after the instruction completes. This
operation allows a stack pointer to be loaded into the ESP register with the next
instruction (MOV ESP, stack-pointer value) before an interrupt occurs. The LSS
instruction offers a more efficient method of loading the SS and ESP registers.
When moving data in 32-bit mode between a segment register and a 32-bit
general-purpose register, the Pentium Pro processor does not require the use of a
16-bit operand size prefix; however, some assemblers do require this prefix. The
processor assumes that the sixteen least-significant bits of the general-purpose register
are the destination or source operand. When moving a value from a segment selector
to a 32-bit register, the processor fills the two high-order bytes of the register with
zeros.
Operation
DEST SRC;
Loading a segment register while in protected mode results in special checks and
actions, as described in the following listing. These checks are performed on the
segment selector and the segment descriptor it points to.
IF SS is loaded;
THEN
IF segment selector is null
FI;
IF segment selector index is outside descriptor table limits
FI;
IF segment not marked present
ELSE
Volume 4: Base IA-32 Instruction Reference
THEN #GP(0);
OR segment selector's RPL  CPL
OR segment is not a writable data segment
OR DPL  CPL
THEN #GP(selector);
THEN #SS(selector);
4:285

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents