![Intel ITANIUM ARCHITECTURE Скачать руководство пользователя страница 78](http://html.mh-extra.com/html/intel/itanium-architecture/itanium-architecture_manual_2073403078.webp)
Volume 4: Base IA-32 Instruction Reference
4:71
CMPS/CMPSB/CMPSW/CMPSD—Compare String Operands
Description
Compares the byte, word, or double word specified with the first source operand with
the byte, word, or double word specified with the second source operand and sets the
status flags in the EFLAGS register according to the results. The first source operand
specifies the memory location at the address DS:ESI and the second source operand
specifies the memory location at address ES:EDI. (When the operand-size attribute is
16, the SI and DI register are used as the source-index and destination-index registers,
respectively.) The DS segment may be overridden with a segment override prefix, but
the ES segment cannot be overridden.
The CMPSB, CMPSW, and CMPSD mnemonics are synonyms of the byte, word, and
doubleword versions of the CMPS instructions. They are simpler to use, but provide no
type or segment checking. (For the CMPS instruction, “DS:ESI” and “ES:EDI” must be
explicitly specified in the instruction.)
After the comparison, the ESI and EDI registers are incremented or decremented
automatically according to the setting of the DF flag in the EFLAGS register. (If the DF
flag is 0, the ESI and EDI register are incremented; if the DF flag is 1, the ESI and EDI
registers are decremented.) The registers are incremented or decremented by 1 for
byte operations, by 2 for word operations, or by 4 for doubleword operations.
The CMPS, CMPSB, CMPSW, and CMPSD instructions can be preceded by the REP prefix
for block comparisons of ECX bytes, words, or doublewords. More often, however, these
instructions will be used in a LOOP construct that takes some action based on the
setting of the status flags before the next comparison is made.
Opcode
Instruction
Description
A6
CMPS DS:(E)SI, ES:(E)DI
Compares byte at address DS:(E)SI with byte at address
ES:(E)DI and sets the status flags accordingly
A7
CMPS DS:SI, ES:DI
Compares byte at address DS:SI with byte at address
ES:DI and sets the status flags accordingly
A7
CMPS DS:ESI, ES:EDI
Compares byte at address DS:ESI with byte at address
ES:EDI and sets the status flags accordingly
A6
CMPSB
Compares byte at address DS:(E)SI with byte at address
ES:(E)DI and sets the status flags accordingly
A7
CMPSW
Compares byte at address DS:SI with byte at address
ES:DI and sets the status flags accordingly
A7
CMPSD
Compares byte at address DS:ESI with byte at address
ES:EDI and sets the status flags accordingly
Содержание ITANIUM ARCHITECTURE
Страница 1: ......
Страница 7: ...402 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Страница 199: ...4 192 Volume 4 Base IA 32 Instruction Reference FWAIT Wait See entry for WAIT ...
Страница 269: ...4 262 Volume 4 Base IA 32 Instruction Reference LES Load Full Pointer See entry for LDS LES LFS LGS LSS ...
Страница 270: ...Volume 4 Base IA 32 Instruction Reference 4 263 LFS Load Full Pointer See entry for LDS LES LFS LGS LSS ...
Страница 273: ...4 266 Volume 4 Base IA 32 Instruction Reference LGS Load Full Pointer See entry for LDS LES LFS LGS LSS ...
Страница 288: ...Volume 4 Base IA 32 Instruction Reference 4 281 LSS Load Full Pointer See entry for LDS LES LFS LGS LSS ...
Страница 352: ...Volume 4 Base IA 32 Instruction Reference 4 345 ROL ROR Rotate See entry for RCL RCR ROL ROR ...
Страница 368: ...Volume 4 Base IA 32 Instruction Reference 4 361 SHL SHR Shift Instructions See entry for SAL SAR SHL SHR ...
Страница 373: ...4 366 Volume 4 Base IA 32 Instruction Reference SIDT Store Interrupt Descriptor Table Register See entry for SGDT SIDT ...
Страница 589: ...4 582 Volume 4 IA 32 SSE Instruction Reference ...
Страница 590: ...Index Intel Itanium Architecture Software Developer s Manual Rev 2 3 Index ...
Страница 591: ...Index Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Страница 603: ...INDEX Index 12 Index for Volumes 1 2 3 and 4 ...
Страница 604: ......