Volume 3: General-Purpose and System Instructions - Stanford ...
Volume 3: General-Purpose and System Instructions - Stanford ... Volume 3: General-Purpose and System Instructions - Stanford ...
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
- Page 270 and 271: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 272 and 273: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 274 and 275: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 276 and 277: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 278 and 279: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 280 and 281: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 282 and 283: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 284 and 285: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 286 and 287: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 288 and 289: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 290 and 291: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 292 and 293: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 294 and 295: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 296 and 297: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 298 and 299: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 300 and 301: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 302 and 303: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 304 and 305: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 306 and 307: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 308 and 309: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 310 and 311: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 312 and 313: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 314 and 315: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 316 and 317: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 318 and 319: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 322 and 323: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 324 and 325: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 326 and 327: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 328 and 329: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 330 and 331: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 332 and 333: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 334 and 335: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 336 and 337: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 338 and 339: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 340 and 341: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 342 and 343: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 344 and 345: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 346 and 347: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 348 and 349: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 350 and 351: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 352 and 353: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 354 and 355: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 356 and 357: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 358 and 359: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 360 and 361: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 362 and 363: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 364 and 365: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 366 and 367: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 368 and 369: AMD64 Technology 24594 Rev. 3.10 Fe
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