반응형
CMOV -- Conditional Move (조건부 대입) 명령어 정리
※ : r32, r/m32에도 동일하게 적용된다.
ex) CMOVZ ecx, [ebp-23ch] : ecx가 0(ZF==1)이라면 ecx에 [ebp-23ch]를 대입한다.
C : CMP
MOV
Z : Condition
(if dst==zero) ==> mov ecx, [ebp-23ch] 이라고 생각하면 이해가 쉽다.
Opcode | Instruction | Description |
0F 40 /r | CMOVO r16, r/m16 | Move if overflow (OF=0) |
0F 41 /r | CMOVNO r16, r/m16 | Move if not overflow (OF=0) |
0F 42 /r | CMOVB r16, r/m16 | Move if below (CF=1) |
0F 42 /r | CMOVC r16, r/m16 | Move if carry (CF=1) |
0F 43 /r | CMOVAE r16, r/m16 | Move if above or equal (CF=0) |
0F 43 /r | CMOVNB r16, r/m16 | Move if not below (CF=0) |
0F 43 /r | CMOVNC r16, r/m16 | Move if not carry (CF=0) |
0F 44 /r | CMOVE r16, r/m16 | Move if equal (ZF=1) |
0F 44 /r | CMOVZ r16, r/m16 | Move if zero (ZF=1) |
0F 45 /r | CMOVNE r16, r/m16 | Move if not equal (ZF=0) |
0F 45 /r | CMOVNZ r16, r/m16 | Move if not zero (ZF=0) |
0F 46 /r | CMOVBE r16, r/m16 | Move if below or equal (CF=1 or ZF=1) |
0F 46 /r | CMOVNA r16, r/m16 | Move if not above (CF=1 or ZF=1) |
0F 47 /r | CMOVA r16, r/m16 | Move if above (CF=0 and ZF=0) |
0F 47 /r | CMOVNBE r16, r/m16 | Move if not below or equal (CF=0 and ZF=0) |
0F 48 /r | CMOVS r16, r/m16 | Move if sign (SF=1) |
0F 49 /r | CMOVNS r16, r/m16 | Move if not sign (SF=0) |
0F 4A /r | CMOVP r16, r/m16 | Move if parity (PF=1) |
0F 4A /r | CMOVPE r16, r/m16 | Move if parity even (PF=1) |
0F 4B /r | CMOVNP r16, r/m16 | Move if not parity (PF=0) |
0F 4B /r | CMOVPO r16, r/m16 | Move if parity odd (PF=0) |
0F 4C /r | CMOVL r16, r/m16 | Move if less (SF<>OF) |
0F 4C /r | CMOVNGE r16, r/m16 | Move if not greater or equal (SF<>OF) |
0F 4D /r | CMOVGE r16, r/m16 | Move if greater or equal (SF=OF) |
0F 4D /r | CMOVNL r16, r/m16 | Move if not less (SF=OF) |
0F 4E /r | CMOVLE r16, r/m16 | Move if less or equal (ZF=1 or SF<>OF) |
0F 4E /r | CMOVNG r16, r/m16 | Move if not greater (ZF=1 or SF<>OF) |
0F 4F /r | CMOVG r16, r/m16 | Move if greater (ZF=0 and SF=OF) |
0F 4F /r | CMOVNLE r16, r/m16 | Move if not less or equal (ZF=0 and SF=OF) |
반응형
'Assembly' 카테고리의 다른 글
pushad assembly (0) | 2019.11.15 |
---|---|
xchg assembly (0) | 2018.02.22 |
MOVUPS assembly (0) | 2018.02.13 |
CBW, CDW, CDQ assembly (0) | 2017.05.10 |
imul assembly (0) | 2017.05.10 |