Hi --

I've run into a problem with the MicroBlaze backend
where it is not recognizing a return pattern.  I'm
trying to modify the back end to use the 'simple_return'
pattern, rather than 'return', since MicroBlaze has
exactly what the documentation describes:  a no-frills
return instruction which does nothing more than branch
back to the caller.

When I define only 'simple_return', there are undefined
references in function.c for emit_return_into_block()
and emit_use_return_register_into_block(), since these
are defined when HAVE_return is defined.

MIPS has a similar call/return model, with a trivial
return instruction.  mips.md defines expanders for both
'return' and 'simple_return' and identical insn's for both
which generate the return jump.

ARM also has a simple return, but the back end defines
'return' and does not define 'simple_return'.

My guess is that the #ifdef HAVE_return in function.c
which surrounds the undefined functions should be removed.

What is the correct model for the back end?  Define only
'return' like ARM, define both 'return' and 'simple_return'
like MIPS, or define only 'simple_return' like I tried to do?

--
Michael Eager    ea...@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

Reply via email to