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 was announced that the trouble was not malignant.... It was a typical triumph of modern science to find the only part of Randolph that was not malignant and remove it.”
—Evelyn Waugh (19031966)
“The optimist proclaims that we live in the best of all possible worlds; and the pessimist fears this is true.”
—James Branch Cabell (18791958)
“Young men all of usweve got to be. You know why? Ill give you two good reasons. We jump out of planes, and guys shoot at us.”
—Alvah Bessie, Ranald MacDougall, and Lester Cole. Raoul Walsh. Captain Nelson (Errol Flynn)
“Realizing that his time was nearly spent, he gave full oral instructions about his burial and the manner in which he wished to be remembered.... A few minutes later, feeling very tired, he left the room, remarking, I have no disposition to leave this precious circle. I love to be here surrounded by my family and friends. Then he gave them his blessing and said, I am ready to go and I wish you goodnight.”
—For the State of New Hampshire, U.S. public relief program (1935-1943)
“In our most trivial walks, we are constantly, though unconsciously, steering like pilots by certain well-known beacons and headlands, and if we go beyond our usual course we still carry in our minds the bearing of some neighboring cape; and not till we are completely lost, or turned round,for a man needs only to be turned round once with his eyes shut in this world to be lost,do we appreciate the vastness and strangeness of nature.”
—Henry David Thoreau (18171862)