[LLVMdev] Indirect branch instruction

Eric van Riet Paap ericvrp at gmail.com
Thu Jan 11 10:16:39 PST 2007


On Jan 11, 2007, at 7:14 AM, Chris Lattner wrote:

> On Wed, 10 Jan 2007, Nicolas Geoffray wrote:
>> I was looking for an indirect branch instruction in llvm, which would
>> not take a BasicBlock as argument, but a value. Reid told me on  
>> IRC that
>> there is no such instruction in llvm.
>>
>> Is this deliberate? Or did you never face the need of this  
>> instruction
>> yet?
>
> The switch instruction serves the same functional role.  In llvm- 
> gcc, the
> GCC "Address of label" and "indirect goto" extensions are compiled  
> into a
> switch instruction.

I think the question is how to branch to a location of which you do  
not have a label.
Presumably to avoid a stack overflow when you know that you only want  
to return the result of an indirect call.

- Eric

>
> -Chris
>
> -- 
> http://nondot.org/sabre/
> http://llvm.org/
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list