This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to use a scratch register in "jump" pattern ?


Stelian Pop wrote:

> I need to use a scratch register in the "jump" pattern and I can't
> figure out how to do it properly.
> 
> My problem is that the microcontroller I'm porting gcc onto does not
> permit "far" jumps, those must be done using an indirect adressing.

> (define_insn "*jump"

> Any idea ?

  You should be able to define/use the "indirect_jump" pattern instead?  Take
a look at the last paragraph of the the docs for the "call" pattern as well.

  I don't think it'll work to have a jump insn that is sometimes direct,
sometimes indirect.

  Looking at how the rs6000 backend handles direct and indirect calls and
jumps might give you some inspiration too.

    cheers,
      DaveK



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]