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 2005Related InstructionsCLTS, LMSW, SMSWrFLAGS AffectedNoneExceptionsExceptionInvalid Instruction,#UDGeneral protection,#GPRealVirtual8086 Protected Cause of ExceptionX X X An illegal control register was referenced (CR1, CR5–CR7,CR9–CR15).XXXXCPL was not 0.An attempt was made to set CR0.PG = 1 and CR0.PE = 0.XXXXXXXXXAn attempt was made to set CR0.CD = 0 and CR0.NW = 1.Reserved bits were set in the page-directory pointers table (used inthe legacy extended physical addressing mode) and the instructionmodified CR0, CR3, or CR4.An attempt was made to write 1 to any reserved bit in CR0, CR3, CR4or CR8.An attempt was made to set CR0.PG while long mode was enabled(EFER.LME = 1), but paging address extensions were disabled(CR4.PAE = 0).An attempt was made to clear CR4.PAE while long mode was active(EFER.LMA = 1).330 MOV(CRn)
24594 Rev. 3.10 February 2005 AMD64 TechnologyMOV(DRn)Move to/from Debug RegistersMoves the contents of a debug register into a 32-bit or 64-bit general-purpose registeror vice versa.In 64-bit mode, the operand size is fixed at 64 bits without the need for a REX prefix.In non-64-bit mode, the operand size is fixed at 32-bits and the upper 32 bits of thedestination are forced to 0.DR0 through DR3 are linear breakpoint address registers. DR6 is the debug statusregister and DR7 is the debug control register. DR4 and DR5 are aliased to DR6 andDR7 if CR4.DE = 0, and are reserved if CR4.DE = 1.DR8 through DR15 are reserved and generate an undefined opcode exception ifreferenced.These instructions are privileged and must be executed at CPL 0.The MOV DRn,reg32 and MOV DRn,reg64 instructions are serializing instructions.The MOV(DR) instruction is always treated as a register-to-register (MOD = 11)instruction, regardless of the encoding of the MOD field in the MODR/M byte.See “Debug and Performance Resources” in Volume 2 for details.Mnemonic Opcode DescriptionMOV reg32, DRn 0F 21 /r Move the contents of DRn to a 32-bit register.MOV reg64, DRn 0F 21 /r Move the contents of DRn to a 64-bit register.MOV DRn, reg32 0F 23 /r Move the contents of a 32-bit register to DRn.MOV DRn, reg64 0F 23 /r Move the contents of a 64-bit register to DRn.Related InstructionsNonerFLAGS AffectedNoneMOV(DRn) 331
- 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 320 and 321: 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 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
- Page 370 and 371: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 372 and 373: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 374 and 375: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 376 and 377: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 378 and 379: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 380 and 381: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 382 and 383: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 384 and 385: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 386 and 387: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 388 and 389: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 390 and 391: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 392 and 393: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 394 and 395: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 396 and 397: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 398 and 399: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 400 and 401: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 402 and 403: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 404 and 405: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 406 and 407: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 408 and 409: AMD64 Technology 24594 Rev. 3.10 Fe
24594 Rev. 3.10 February 2005 AMD64 TechnologyMOV(DRn)Move to/from Debug RegistersMoves the contents of a debug register into a 32-bit or 64-bit general-purpose registeror vice versa.In 64-bit mode, the oper<strong>and</strong> size is fixed at 64 bits without the need for a REX prefix.In non-64-bit mode, the oper<strong>and</strong> size is fixed at 32-bits <strong>and</strong> the upper 32 bits of thedestination are forced to 0.DR0 through DR3 are linear breakpoint address registers. DR6 is the debug statusregister <strong>and</strong> DR7 is the debug control register. DR4 <strong>and</strong> DR5 are aliased to DR6 <strong>and</strong>DR7 if CR4.DE = 0, <strong>and</strong> are reserved if CR4.DE = 1.DR8 through DR15 are reserved <strong>and</strong> generate an undefined opcode exception ifreferenced.These instructions are privileged <strong>and</strong> must be executed at CPL 0.The MOV DRn,reg32 <strong>and</strong> MOV DRn,reg64 instructions are serializing instructions.The MOV(DR) instruction is always treated as a register-to-register (MOD = 11)instruction, regardless of the encoding of the MOD field in the MODR/M byte.See “Debug <strong>and</strong> Performance Resources” in <strong>Volume</strong> 2 for details.Mnemonic Opcode DescriptionMOV reg32, DRn 0F 21 /r Move the contents of DRn to a 32-bit register.MOV reg64, DRn 0F 21 /r Move the contents of DRn to a 64-bit register.MOV DRn, reg32 0F 23 /r Move the contents of a 32-bit register to DRn.MOV DRn, reg64 0F 23 /r Move the contents of a 64-bit register to DRn.Related <strong>Instructions</strong>NonerFLAGS AffectedNoneMOV(DRn) 331