On Mon, Apr 14, 2008 at 11:07 PM, Ian Lance Taylor <[EMAIL PROTECTED]> wrote:
>
> "Mohamed Shafi" <[EMAIL PROTECTED]> writes:
>
>  > I have read in the internals that indirect_jump and jump pattern are
>  > necessary in any back-end for the compiler to be build and work
>  > successfully. For any back-end there will be some limitation as to how
>  > big the offset used in the jump instructions can be. If the offset is
>  > too big then the indirect_jump pattern has to utilized. Now my
>  > question is how will i be able to specify the limit of the offset so
>  > the gcc generates indirect_jump pattern instead of the jump pattern? I
>  > hope i am clear.
>
>  From the perspective of insn names, it's not quite accurate to say
>  that jump turns into indirect_jump.  It would be more correct to say
>  that when there is a limit to the offset for jump, it needs to use a
>  register.
>
>  The way to handle this is to set the "length" attribute correctly for
>  each insn, and to change code generation based on the length.  See,
>  e.g., the mips.md "jump" insn for an example.
>
  Ok , looking at another reply from Jim
(http://gcc.gnu.org/ml/gcc/2008-04/msg00311.html), where he suggests
to use shorten_branhes in reorg and generate indirect branch, it looks
like i will have to reserve a register.  Am i right?

If that is the case it seems that there is no need for a indirect_jump pattern.
So can you tell me when exactly are the indirect_jump patterns will be
utilized by gcc?

Regards,
Shafi

Reply via email to