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

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

scs.stanford.edu
from scs.stanford.edu More from this publisher
13.07.2015 Views

AMD64 Technology 24594 Rev. 3.10 February 2005LGDTLoad Global Descriptor Table RegisterLoads the pseudo-descriptor specified by the source operand into the globaldescriptor table register (GDTR). The pseudo-descriptor is a memory locationcontaining the GDTR base and limit. In legacy and compatibility mode, the pseudodescriptoris 6 bytes; in 64-bit mode, it is 10 bytes.If the operand size is 16 bits, the high-order byte of the 6-byte pseudo-descriptor is notused. The lower two bytes specify the 16-bit limit and the third, fourth, and fifth bytesspecify the 24-bit base address. The high-order byte of the GDTR is filled with zeros.If the operand size is 32 bits, the lower two bytes specify the 16-bit limit and the upperfour bytes specify a 32-bit base address.In 64-bit mode, the lower two bytes specify the 16-bit limit and the upper eight bytesspecify a 64-bit base address. In 64-bit mode, operand-size prefixes are ignored andthe operand size is forced to 64-bits; therefore, the pseudo-descriptor is always 10bytes.This instruction is only used in operating system software and must be executed atCPL 0. It is typically executed once in real mode to initialize the processor beforeswitching to protected mode.LGDT is a serializing instruction.Mnemonic Opcode DescriptionLGDT mem16:32 0F 01 /2 Loads mem16:32 into the global descriptor table register.LGDT mem16:64 0F 01 /2 Loads mem16:64 into the global descriptor table register.Related InstructionsLIDT, LLDT, LTR, SGDT, SIDT, SLDT, STRrFLAGS AffectedNone318 LGDT

24594 Rev. 3.10 February 2005 AMD64 TechnologyExceptionsException RealVirtual8086 Protected Cause of ExceptionInvalid opcode, #UD X X X The operand was a register.Stack, #SS X X A memory address exceeded the stack segment limit or was noncanonical.General protection, #GP XX A memory address exceeded the data segment limit or was noncanonical.XXXCPL was not 0.The new GDT base address was non-canonical.X A null data segment was used to reference memory.Page fault, #PF X A page fault resulted from the execution of the instruction.LGDT 319

24594 Rev. 3.10 February 2005 AMD64 TechnologyExceptionsException RealVirtual8086 Protected Cause of ExceptionInvalid opcode, #UD X X X The oper<strong>and</strong> was a register.Stack, #SS X X A memory address exceeded the stack segment limit or was noncanonical.<strong>General</strong> protection, #GP XX A memory address exceeded the data segment limit or was noncanonical.XXXCPL was not 0.The new GDT base address was non-canonical.X A null data segment was used to reference memory.Page fault, #PF X A page fault resulted from the execution of the instruction.LGDT 319

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

Saved successfully!

Ooh no, something went wrong!