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:
“Consciousness is cerebral celebritynothing more and nothing less. Those contents are conscious that persevere, that monopolize resources long enough to achieve certain typical and symptomatic effectson memory, on the control of behavior and so forth.”
—Daniel Clement Dennett (b. 1942)
“She saw a dust bearing bee sink into the sanctum of a bloom; the thousand sister calxes arch to meet the love embrace and the ecstatic shiver of the tree from root to tiniest branch creaming in every blossom and frothing with delight. So this was a marriage!”
—Zora Neale Hurston (18911960)
“One is twice as willing to jump in after a person who has fallen into the water when there are people present who do not dare to do so.”
—Friedrich Nietzsche (18441900)
“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)