ECE 391 Lecture 3: Control Flow Instructions

86 views5 pages

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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers