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:
“The books may say that nine-month-olds crawl, say their first words, and are afraid of strangers. Your exuberantly concrete and special nine-month-old hasnt read them. She may be walking already, not saying a word and smiling gleefully at every stranger she sees. . . . You can support her best by helping her learn what shes trying to learn, not what the books say a typical child ought to be learning.”
—Amy Laura Dombro (20th century)
“What can the dove of Jesus give
You now but wisdom, exile? Stand and live,
The dove has brought an olive branch to eat.”
—Robert Lowell (19171977)
“If my head hurt a hairs foot
Pack back the downed bone. If the unpricked ball of my breath
Bump on a spout let the bubbles jump out....”
—Dylan Thomas (19141953)
“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)
“Self-determination has to mean that the leader is your individual gut, and heart, and mind or were talking about power, again, and its rather well-known impurities. Who is really going to care whether you live or die and who is going to know the most intimate motivation for your laughter and your tears is the only person to be trusted to speak for you and to decide what you will or will not do.”
—June Jordan (b. 1939)