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 2005MOVSXDMove with Sign-Extend DoublewordCopies the 32-bit value in a register or memory location (second operand) into a 64-bitregister (first operand), extending the most significant bit of the 32-bit value into allhigher bits of the 64-bit register.This instruction requires the REX prefix 64-bit operand size bit (REX.W) to be set to 1to sign-extend a 32-bit source operand to a 64-bit result. Without the REX operandsizeprefix, the operand size will be 32 bits, the default for 64-bit mode, and the sourceis zero-extended into a 64-bit register. With a 16-bit operand size, only 16 bits arecopied, without modifying the upper 48 bits in the destination.This instruction is available only in 64-bit mode. In legacy or compatibility mode thisopcode is interpreted as ARPL.Mnemonic Opcode DescriptionMOVSXD reg64, reg/mem32 63 /rMove the contents of a 32-bit register or memory operand to a64-bit register with sign extension.Related InstructionsMOVSX, MOVZXrFLAGS AffectedNoneExceptionsException RealVirtual8086 Protected Cause of ExceptionStack, #SS X A memory address was non-canonical.General protection,X A memory address was non-canonical.#GPPage fault, #PF X A page fault resulted from the execution of the instruction.Alignment check, #AC X An unaligned memory reference was performed while alignmentchecking was enabled.208 MOVSXD

24594 Rev. 3.10 February 2005 AMD64 TechnologyMOVZXMove with Zero-ExtensionCopies the value in a register or memory location (second operand) into a register(first operand), zero-extending the value to fit in the destination register. Theoperand-size attribute determines the size of the zero-extended value.Mnemonic Opcode DescriptionMOVZX reg16, reg/mem8 0F B6 /rMOVZX reg32, reg/mem8 0F B6 /rMOVZX reg64, reg/mem8 0F B6 /rMOVZX reg32, reg/mem16 0F B7 /rMOVZX reg64, reg/mem16 0F B7 /rMove the contents of an 8-bit register or memory operand to a16-bit register with zero-extension.Move the contents of an 8-bit register or memory operand to a32-bit register with zero-extension.Move the contents of an 8-bit register or memory operand to a64-bit register with zero-extension.Move the contents of a 16-bit register or memory operand to a32-bit register with zero-extension.Move the contents of a 16-bit register or memory operand to a64-bit register with zero-extension.Related InstructionsMOVSXD, MOVSXrFLAGS AffectedNoneExceptionsException RealVirtual8086 Protected Cause of ExceptionStack, #SS X X X A memory address exceeded the stack segment limit or was noncanonical.General protection,#GPX X XA memory address exceeded a data segment limit or was non-canonical.X A null data segment was used to reference memory.Page fault, #PF X X A page fault resulted from the execution of the instruction.Alignment check, #AC X X An unaligned memory reference was performed while alignmentchecking was enabled.MOVZX 209

24594 Rev. 3.10 February 2005 AMD64 TechnologyMOVZXMove with Zero-ExtensionCopies the value in a register or memory location (second oper<strong>and</strong>) into a register(first oper<strong>and</strong>), zero-extending the value to fit in the destination register. Theoper<strong>and</strong>-size attribute determines the size of the zero-extended value.Mnemonic Opcode DescriptionMOVZX reg16, reg/mem8 0F B6 /rMOVZX reg32, reg/mem8 0F B6 /rMOVZX reg64, reg/mem8 0F B6 /rMOVZX reg32, reg/mem16 0F B7 /rMOVZX reg64, reg/mem16 0F B7 /rMove the contents of an 8-bit register or memory oper<strong>and</strong> to a16-bit register with zero-extension.Move the contents of an 8-bit register or memory oper<strong>and</strong> to a32-bit register with zero-extension.Move the contents of an 8-bit register or memory oper<strong>and</strong> to a64-bit register with zero-extension.Move the contents of a 16-bit register or memory oper<strong>and</strong> to a32-bit register with zero-extension.Move the contents of a 16-bit register or memory oper<strong>and</strong> to a64-bit register with zero-extension.Related <strong>Instructions</strong>MOVSXD, MOVSXrFLAGS AffectedNoneExceptionsException RealVirtual8086 Protected Cause of ExceptionStack, #SS X X X A memory address exceeded the stack segment limit or was noncanonical.<strong>General</strong> protection,#GPX X XA memory address exceeded a data segment limit or was non-canonical.X A null data segment was used to reference memory.Page fault, #PF X X A page fault resulted from the execution of the instruction.Alignment check, #AC X X An unaligned memory reference was performed while alignmentchecking was enabled.MOVZX 209

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

Saved successfully!

Ooh no, something went wrong!