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
US Patent Issued to Oracle America on May 7 for "Encoding Switch on Ordered Universes with Binary Decision Diagrams" (California Inventors)
May 07, 2013; ALEXANDRIA, Va., May 7 -- United States Patent no. 8,438,536, issued on May 7, was assigned to Oracle America Inc. (Redwood City,...