13.07.2015 Views

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

AMD64 Technology 24594 Rev. 3.10 February 2005A.2.8 rFLAGSCondition Codes forx87 OpcodesTable A-11 shows the rFLAGS condition codes specified by theopcode <strong>and</strong> ModRM bytes of the FCMOVcc instructions.Table A-11.rFLAGS Condition Codes for FCMOVccOpcode(hex)DADBModRMmodField11ModRMregFieldrFLAGS Value cc Mnemonic Condition000 CF = 1 B Below001 ZF = 1 E Equal010 CF = 1 or ZF = 1 BE Below or Equal011 PF = 1 U Unordered000 CF = 0 NB Not Below001 ZF = 0 NE Not Equal010 CF = 0 <strong>and</strong> ZF = 0 NBE Not Below or Equal011 PF = 0 NU Not UnorderedA.3 Oper<strong>and</strong> EncodingsRegister <strong>and</strong> memory oper<strong>and</strong>s are encoded using the moderegister-memory(ModRM) <strong>and</strong> the scale-index-base (SIB) bytesthat follow the opcodes. In some instructions, the ModRM byteis followed by an SIB byte, which defines the instruction’smemory-addressing mode for the complex-addressing modes.A.3.1 ModRMOper<strong>and</strong> ReferencesFigure A-2 on page 403 shows the format of a ModRM byte.There are three fields—mod, reg, <strong>and</strong> r/m. The reg field not onlyprovides additional opcode bits—as described above beginningwith “ModRM Extensions to One-Byte <strong>and</strong> Two-Byte Opcodes”on page 387 <strong>and</strong> ending with “x87 Encodings” on page 392—but is also used with the other two fields to specify oper<strong>and</strong>s.The mod <strong>and</strong> r/m fields are used together with each other <strong>and</strong>,in 64-bit mode, with the REX.R <strong>and</strong> REX.B bits of the REXprefix, to specify the location of the instruction’s oper<strong>and</strong>s <strong>and</strong>certain of the possible addressing modes (specifically, the noncomplexmodes).402 Appendix A: Opcode <strong>and</strong> Oper<strong>and</strong> Encodings

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

Saved successfully!

Ooh no, something went wrong!