Compare and Jump
A compare is a subtract that does not store its results; however, the results set the condition code, which can be tested by jump instructions.
| cmpl | S,D | compare D - S , set condition , integer | ||
| cmpq | S,D | compare D - S , set condition , pointer | ||
| cmpsd | S,D | compare D - S , set condition , float | ||
The jump instructions test the condition code:
| jmp | Jump always. |
| jle | Jump if D ≤ S |
| je | Jump if D = S |
| jne | Jump if D ≠ S |
| jge | Jump if D ≥ S |
| jl | Jump if D < S |
| jg | Jump if D > S |