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 2005Mnemonic Opcode DescriptionXCHG reg16, reg/mem16 87 /rXCHG reg/mem32, reg32 87 /rXCHG reg32, reg/mem32 87 /rXCHG reg/mem64, reg64 87 /rXCHG reg64, reg/mem64 87 /rExchange the contents of a 16-bit register or memory operandwith the contents of a 16-bit register.Exchange the contents of a 32-bit register with the contents of a32-bit register or memory operand.Exchange the contents of a 32-bit register or memory operandwith the contents of a 32-bit register.Exchange the contents of a 64-bit register with the contents of a64-bit register or memory operand.Exchange the contents of a 64-bit register or memory operandwith the contents of a 64-bit register.Related InstructionsBSWAP, XADDrFLAGS 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.XThe source or destination operand was in a non-writable segment.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.290 XCHG

24594 Rev. 3.10 February 2005 AMD64 TechnologyXLATxXLATBTranslate Table IndexUses the unsigned integer in the AL register as an offset into a table and copies thecontents of the table entry at that location to the AL register.The instruction uses seg:[rBX] as the base address of the table. The value of segdefaults to the DS segment, but may be overridden by a segment prefix.This instruction writes AL without changing RAX[63:8]. This instruction ignoresoperand size.The single-operand form of the XLAT instruction uses the operand to document thesegment and address size attribute, but it uses the base address specified by the rBXregister.This instruction is often used to translate data from one format (such as ASCII) toanother (such as EBCDIC).Mnemonic Opcode DescriptionXLAT mem8 D7 Set AL to the contents of DS:[rBX + unsigned AL].XLATB D7 Set AL to the contents of DS:[rBX + unsigned AL].Related InstructionsNonerFLAGS AffectedNoneExceptionsException RealVirtual8086 Protected Cause of ExceptionStack, #SS X X X A memory address exceeded the stack segment limit or was noncanonical.XLATx 291

24594 Rev. 3.10 February 2005 AMD64 TechnologyXLATxXLATBTranslate Table IndexUses the unsigned integer in the AL register as an offset into a table <strong>and</strong> copies thecontents of the table entry at that location to the AL register.The instruction uses seg:[rBX] as the base address of the table. The value of segdefaults to the DS segment, but may be overridden by a segment prefix.This instruction writes AL without changing RAX[63:8]. This instruction ignoresoper<strong>and</strong> size.The single-oper<strong>and</strong> form of the XLAT instruction uses the oper<strong>and</strong> to document thesegment <strong>and</strong> address size attribute, but it uses the base address specified by the rBXregister.This instruction is often used to translate data from one format (such as ASCII) toanother (such as EBCDIC).Mnemonic Opcode DescriptionXLAT mem8 D7 Set AL to the contents of DS:[rBX + unsigned AL].XLATB D7 Set AL to the contents of DS:[rBX + unsigned AL].Related <strong>Instructions</strong>NonerFLAGS AffectedNoneExceptionsException RealVirtual8086 Protected Cause of ExceptionStack, #SS X X X A memory address exceeded the stack segment limit or was noncanonical.XLATx 291

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

Saved successfully!

Ooh no, something went wrong!