| Conditional operations | |||||
| Name | Description | Code | Operation | operands | operand size |
|---|---|---|---|---|---|
| set | Set byte if true | set<cond> dest | dest = 1 if <cond> is true dest = 0 if <cond> is false |
reg mem |
byte |
| salc | Set AL if carry | salc | al = 0xFF if CF=1 al = 0x00 if CF=0 |
||
| cmov | Conditional move | cmov<cond> dest,source | dest = source if <cond> is true |
reg, reg |
word, word dword,dword |
| cmpxchg | Compare and exchange | cmpxchg dest,source | dest = source if dest=al/ax/eax al/ax/eax = dest otherwise |
reg,reg mem,reg |
byte,byte word,word dword,dword |
| cmpxchg8b | Compare and exchange 8 bytes | cmpxchg8b dest | dest = ecx:ebx if dest=edx:eax edx:eax = dest otherwise |
mem | qword |
| Mnemonic | Condition tested | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| o | OF = 1 | overflow | ||||||
| no | OF = 0 | not overflow | ||||||
|
CF = 1 |
|
||||||
|
CF = 0 |
|
||||||
|
ZF = 1 |
|
||||||
|
ZF = 0 |
|
||||||
|
CF or ZF = 1 |
|
||||||
|
CF or ZF = 0 |
|
||||||
| s | SF = 1 | sign | ||||||
| ns | SF = 0 | not sign | ||||||
|
PF = 1 |
|
||||||
|
PF = 0 |
|
||||||
|
SF xor OF = 1 |
|
||||||
|
SF xor OF = 0 |
|
||||||
|
(SF xor OF) or ZF = 1 |
|
||||||
|
(SF xor OF) or ZF = 0 |
|