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

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

Advertisement

LMSW—Load Machine Status Word
Opcode
0F 01 /6
Description
Loads the source operand into the machine status word, bits 0 through 15 of register
CR0. The source operand can be a 16-bit general-purpose register or a memory
location. Only the low-order 4 bits of the source operand (which contains the PE, MP,
EM, and TS flags) are loaded into CR0. The PG, CD, NW, AM, WP, NE, and ET flags of
CR0 are not affected. The operand-size attribute has no effect on this instruction.
If the PE flag of the source operand (bit 0) is set to 1, the instruction causes the
processor to switch to protected mode. The PE flag in the CR0 register is a sticky bit.
Once set to 1, the LMSW instruction cannot be used clear this flag and force a switch
back to real address mode.
The LMSW instruction is provided for use in operating-system software; it should not be
used in application programs. In protected or virtual 8086 mode, it can only be
executed at CPL 0.
This instruction is provided for compatibility with the Intel 286 processor; programs and
procedures intended to run on processors more recent than the Intel 286 should use
the MOV (control registers) instruction to load the machine status word.
This instruction is a serializing instruction.
Operation
IF Itanium System Environment THEN IA-32_Intercept(INST,LMSW);
CR0[0:3]  SRC[0:3];
Flags Affected
None.
Additional Itanium System Environment Exceptions
IA-32_Intercept
Protected Mode Exceptions
#GP(0)
#SS(0)
#PF(fault-code)
4:270
Instruction
Description
LMSW r/m16
Loads r/m16 in machine status word of CR0
Mandatory Instruction Intercept
If the current privilege level is not 0.
If a memory operand effective address is outside the CS, DS, ES, FS,
or GS segment limit.
If the DS, ES, FS, or GS register is used to access memory and it
contains a null segment selector.
If a memory operand effective address is outside the SS segment
limit.
If a page fault occurs.
Volume 4: Base IA-32 Instruction Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents