Comparisons of x and y set the condition codes: cmpl y, x
| Condition codes set if x compared to y | Meaning |
|---|---|
| SF | x < y |
| ZF | x == y |
| (neither SF or ZF) | x > y |
Condition codes set after computing some value x. E.g.
- testl x, x (computes x & x)
- subl $1, n (computes n - 1)
| Condition codes set when x is computed | Meaning |
|---|---|
| SF | x < 0 |
| ZF | x == 0 |
| (neither SF or ZF) | x > 0 |