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 2005Exception (vector)RealGeneral protection, #GP X X XVirtual8086 Protected Cause of ExceptionA memory address exceeded a data segment limit or wasnon-canonical.XA null data segment was used to reference memory.X The destination operand was in a non-writable segment.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.204 MOVNTI

24594 Rev. 3.10 February 2005 AMD64 TechnologyMOVSMOVSBMOVSWMOVSDMOVSQMove StringMoves a byte, word, doubleword, or quadword from the memory location pointed to byDS:rSI to the memory location pointed to by ES:rDI, and then increments ordecrements the rSI and rDI registers according to the state of the DF flag in therFLAGS register.If the DF flag is 0, the instruction increments both pointers; otherwise, it decrementsthem. It increments or decrements the pointers by 1, 2, 4, or 8, depending on the sizeof the operands.The forms of the MOVSx instruction with explicit operands address the first operandat seg:[rSI]. The value of seg defaults to the DS segment, but can be overridden by asegment prefix. These instructions always address the second operand at ES:[rDI] (ESmay not be overridden). The explicit operands serve only to specify the type (size) ofthe value being moved.The no-operands forms of the instruction use the DS:[rSI] and ES:[rDI] registers topoint to the value to be moved (they do not allow a segment prefix). The mnemonicdetermines the size of the operands.Do not confuse this MOVSD instruction with the same-mnemonic MOVSD (movescalar double-precision floating-point) instruction in the 128-bit media instruction set.Assemblers can distinguish the instructions by the number and type of operands.The MOVSx instructions support the REP prefixes. For details about the REPprefixes, see “Repeat Prefixes” on page 10.Mnemonic Opcode DescriptionMOVS mem8, mem8MOVS mem16, mem16MOVS mem32, mem32A4A5A5Move byte at DS:rSI to ES:rDI, and then increment or decrementrSI and rDI.Move word at DS:rSI to ES:rDI, and then increment or decrementrSI and rDI.Move doubleword at DS:rSI to ES:rDI, and then increment ordecrement rSI and rDI.MOVSx 205

AMD64 Technology 24594 Rev. 3.10 February 2005Exception (vector)Real<strong>General</strong> protection, #GP X X XVirtual8086 Protected Cause of ExceptionA memory address exceeded a data segment limit or wasnon-canonical.XA null data segment was used to reference memory.X The destination oper<strong>and</strong> was in a non-writable segment.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.204 MOVNTI

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

Saved successfully!

Ooh no, something went wrong!