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: simplejump_p does not recognise jumps in parallel rtx


> Hello,
> I am writing a master thesis about a port to a pedagogical architecture. I have 
> found the same problem Richard Henderson had 3 years ago 
> (http://gcc.gnu.org/ml/gcc-patches/2001-01/msg00558.html):
> 
> A new architecture needs to represent unconditional jumps as
>   (parallel [(set (pc) (label_ref))(clobber (reg))])
> We would abort in several places because we did not recognize
> this insn as a simplejump.
> Sanity checked on alphaev56.
> r~
> 
> Does any body know if there is a way solve that without having to patch gcc?

If you don't need to clobber a specific register that is used for something
else too, you just hide the existence of one register from the compiler
and clobber it in the assembler output.

Or you can make such a register 'fixed' and don't represent the clobbers
till you get to (*targetm.machine_dependent_reorg).

If you need the temporary register to hold the jump target, you could
also use the strategy that the SH port uses to generate SHmedia code: 
pretend that you can do a simple jump, but have the constraints require
an indirect jump, and let reload handle the register allocation.


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