[LLVMdev] Indirect branch instruction

Nicolas Geoffray nicolas.geoffray at lip6.fr
Tue Jan 16 08:23:03 PST 2007


Chris Lattner wrote:
>> Two jumps are executed when using a switch statement for indirect branch:
>> the first jump goes to the right switch case, the second jumps to the
>> corresponding
>> label. However, indirect branches need only one jump: jumping to the
>> value contained
>> in a register for example (which contains the address of a label).
>>     
>
> Can you give a compilable C function as an example?
>
>   
Well I'm not sure on how to do this in C, but in x86 assembly a simple 
jmp %eax
does it.
> -Chris
>
>   




More information about the llvm-dev mailing list