Typical Branch/jump Instructions Exemplified By Some Well-known Architectures
condition or result | x86 | PDP-11, VAX | ARM (partly 6502) | equation |
---|---|---|---|---|
zero (implies equal for sub/cmp) | JZ; JNZ | BEQ; BNE | BEQ; BNE | zero; not zero |
negative (N), sign (S), or minus (M) | JS; JNS | BMI; BPL | BMI; BPL | negative; not negative |
arithmetic overflow (flag called O or V) | JO; JNO | BVS; BVC | BVS; BVC | overflow; not overflow |
carry (from add,cmp,shift, etc.) | JC; JNC | BCS; BCC | BCS; BCC | carry; not carry |
unsigned below (lower) | JB | BLO | BLO * | borrow |
unsigned below or equal (lower or same) | JBE | BLOS | BLS * | borrow or zero |
unsigned above or equal (higher or same) | JAE | BHIS | BHS * | not borrow |
unsigned above (higher) | JA | BHI | BHI * | not borrow and not zero |
signed less than | JL | BLT | BLT | sign≠overflow |
signed less or equal | JLE | BLE | BLE | sign≠overflow or zero |
signed greater or equal | JGE | BGE | BGE | sign=overflow |
signed greater than | JG | BGT | BGT | sign=overflow and not zero |
* x86, the PDP-11, VAX, and some others, set the carry-flag to signal borrow and clear the carry-flag to signal no borrow. ARM, 6502, the PIC, and some others, do the opposite for subtractive operations. This inverted function of the carry flag for certain instructions is marked by (*), that is, borrow=not carry in some parts of the table, but if not otherwise noted, borrow≡carry. However, carry on additive operations are handled the same way by most architectures.
Read more about this topic: Branch (computer Science)
Famous quotes containing the words typical, branch, jump, instructions, well-known:
“It is not however, adulthood itself, but parenthood that forms the glass shroud of memory. For there is an interesting quirk in the memory of women. At 30, women see their adolescence quite clearly. At 30 a womans adolescence remains a facet fitting into her current self.... At 40, however, memories of adolescence are blurred. Women of this age look much more to their earlier childhood for memories of themselves and of their mothers. This links up to her typical parenting phase.”
—Terri Apter (20th century)
“The optimist proclaims that we live in the best of all possible worlds; and the pessimist fears this is true.”
—James Branch Cabell (18791958)
“Most of the folktales dealing with the Indians are lurid and romantic. The story of the Indian lovers who were refused permission to wed and committed suicide is common to many places. Local residents point out cliffs where Indian maidens leaped to their death until it would seem that the first duty of all Indian girls was to jump off cliffs.”
—For the State of Iowa, U.S. public relief program (1935-1943)
“They had supposed their formula was fixed.
They had obeyed instructions to devise
A type of cold, a type of hooded gaze.
But when the Negroes came they were perplexed.
These Negroes looked like men....”
—Gwendolyn Brooks (b. 1917)
“It is well-known what a middleman is: he is a man who bamboozles one party and plunders the other.”
—Benjamin Disraeli (18041881)