ECE 391 Lecture 3: Control Flow Instructions
Document Summary
Unsigned comparisons: above and below signed comparisons: less and greater both: equal/zero unsigned jne relationship =/= jne signed jb jl jbe jle je je jae jge ja jg. These can be used instead of remembering all the flags. Ja is above jae is above and equal je is equal jbe is below and equal jb is below jne is not equal (both signed unsigned) In general, can add n after j to negate sense forms shown are those used when disassembling do not expect binary to retain your version e. g. , jnae becomes jb Example movl , %eax # eax = 1 movl , %ebx # ebx = 2 cmpl %eax, %ebx # ebx = 2-1 ja label #jump is taken mvl , %eax. Ece 391 - lect page 1 mvl , %eax label; # jump taken if %ebx is above (unsigned >) %eax. Second operand is always the destination as well as the operand.