Re: how to code global indirect branches ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Jiayuan" <jerrygonair@xxxxxxxxxxx> writes:

> Now, I need to achieve the same goal without using function calls(and
> therefore no function pointers). So, I am thinking about indirect jumps. I
> tend to define a unique code label within each kernel operator, and then I
> can pass the indirect jump's target address to the mymain function, which
> can then jump to the right instruction. But I don't know how to do it. It
> can be something like the following:

You can't do an indirect jump between functions.  That is really
impossible to implement in C++.  What happens when you goto a
function, and it returns?

gcc does have an extension for computed labels within a single
function.  Look in the documentation for "Labels as Values".

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux