CMP - Compare Two Operands |
* |
A |
B |
C |
D |
E |
F |
G |
H |
I |
J |
K |
L |
M |
N |
O |
P |
Q |
R |
S |
T |
U |
V |
W |
X |
Y |
Z |
? |
Code | Mnemonic | Description |
3C ib | CMP AL, imm8 | Compare imm8 with AL |
3D iw | CMP AX, imm16 | Compare imm16 with AX |
3D id | CMP EAX, imm32 | Compare imm32 with EAX |
80 /7 ib | CMP r/m8, imm8 | Compare imm8 with r/m8 |
81 /7 iw | CMP r/m16, imm16 | Compare imm16 with r/m16 |
81 /7 id | CMP r/m32, imm32 | Compare imm32 with r/m32 |
83 /7 ib | CMP r/m16, imm8 | Compare imm8 with r/m16 |
83 /7 ib | CMP r/m32, imm8 | Compare imm8 with r/m32 |
38 / r | CMP r/m8, r8 | Compare r8 with r/m8 |
39 / r | CMP r/m16, r16 | Compare r16 with r/m16 |
39 / r | CMP r/m32, r32 | Compare r32 with r/m32 |
3A / r | CMP r8, r/m8 | Compare r/m8 with r8 |
3B / r | CMP r16, r/m16 | Compare r/m16 with r16 |
3B / r | CMP r32, r/m32 | Compare r/m32 with r32 |
Operands | Bytes | Clocks | |
reg, reg | 2 | 1 | UV |
mem, reg | 2 + d(0, 2) | 2 | UV |
reg, mem | 2 + d(0, 2) | 2 | UV |
reg, imm | 2 + i(1, 2) | 1 | UV |
mem, imm | 2 + d(0, 2) + i(1, 2) | 2 | UV ( not pairable if there is a displacement and immediate) |
acc, imm | 1 + i(1, 2) | 1 | UV |
ID | unaffected | DF | unaffected |
VIP | unaffected | IF | unaffected |
VIF | unaffected | TF | unaffected |
AC | unaffected | SF | sets according to the result |
VM | unaffected | ZF | sets according to the result |
RF | unaffected | AF | sets according to the result |
NT | unaffected | PF | sets according to the result |
IOPL | unaffected | CF | sets according to the result |
OF | sets according to the result |