Indirect branch

An indirect branch (also known as a computed jump, indirect jump and register-indirect jump) is a type of program control instruction present in some machine language instruction sets. Rather than specifying the address of the next instruction to execute, as in a direct branch, the argument specifies where the address is located. Thus an example could be to 'jump indirect on the r1 register', which would mean that the next instruction to be executed would be at the address whose value is in register r1. The address to be jumped to is not known until the instruction is executed. Indirect branches can also depend on the value of a memory location.

An indirect branch can be useful to make a conditional branch, especially a multi-way branch. For instance, based on program
input, a value could be looked up in a jump table of pointers to code for handling the various cases implied by the data value. The data value could be added to the address of the table, with the result stored in a register. An indirect jump could then be made based on the value of that register, efficiently dispatching program control to the code appropriate to the input.

In a similar manner, subroutine call instructions can be indirect, with the address of the subroutine to be called specified in a register or memory location.

SPARC: jmpl %o7
MIPS: jmpl %ra
X86: jmp %eax
ARM: mov pc, r2
IA64: br.ret.sptk.few rp

Wikimedia Foundation. 2010.

Look at other dictionaries:

  • Branch (disambiguation) — A branch is a part of a woody plant.Branch or branching may also refer to:Computing* Branch (computer science), a point in a computer program where program flow may change depending on a condition. **Branch predictor, the part of a processor that …   Wikipedia

  • Branch (computer science) — For other uses, see Branch (disambiguation). A branch is sequence of code in a computer program which is conditionally executed depending on whether the flow of control is altered or not (at the branching point). The term can be used when… …   Wikipedia

  • Branch table — In computer programming, a branch table (sometimes known as a jump table) is a term used to describe an efficient method of transferring program control (branching) to another part of a program (or a different program that may have been… …   Wikipedia

  • Field Artillery Branch (United States) — Infobox Military Unit unit name= Field Artillery Branch caption=Branch insignia of the U.S. Army Field Artillery, representing two crossed field guns dates= Created November 17, 1775 country= United States allegiance= branch= type= Combat arms… …   Wikipedia

  • West Hempstead Branch —      West Hempstead Branch Side view of West Hempstead Station, from Hempstead Avenue. Overview …   Wikipedia

  • Hawkhurst Branch Line — Locale Kent, England Dates of operation 1892–1961 Track gauge …   Wikipedia

  • Banking agent — A banking agent is a retail or postal outlet contracted by a financial institution or a mobile network operator to process clients’ transactions. Rather than a branch teller, it is the owner or an employee of the retail outlet who conducts the… …   Wikipedia

  • AMD K10 — The AMD K10 is AMD s latest microprocessor architecture. Though there were once reports that the K10 had been cancelled [ AMD s K10 is delayed or dead] , The Inquirer] , the first third generation Opteron… …   Wikipedia

  • Косвенный переход — (от англ. indirect branch, также используются термины computed jump (вычисляемый переход), indirect jump (непрямой переход) и register indirect jump (регистро косвенный переход)) тип программного контроля выполнения инструкций, представленный в… …   Википедия

  • Binary translation — In computing, binary translation is the emulation of one instruction set by another through translation of code. Sequences of instructions are translated from the source to the target instruction set.There is static binary translation, where an… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”

We are using cookies for the best presentation of our site. Continuing to use this site, you agree with this.