SH2A: "RTV/N Rn" implementation

Rask Ingemann Lambertsen rask@sygehus.dk
Wed Jul 18 08:44:00 GMT 2007


On Wed, Jul 18, 2007 at 12:11:28PM +0530, Naveen H.S. wrote:
> Hi,
> 
> We had implemented an insn as:-
> 
> (define_insn "return_rtv"
>  [(parallel [
>         (set (reg:SI R0_REG)
>              (match_operand:SI "register_operand" "r"))
>         (return)])]

This is actually what I had in mind. You just need to also modify the
epilogue expander to use that insn:

(define_expand "epilogue"
  [(return)]
  ""
  "
{
  sh_expand_epilogue (0);
  if (HAVE_return_rtv)
    emit_jump_insn (gen_return_rtv (gen_rtx_REG (SImode, R0_REG)));
  else
    emit_jump_insn (gen_return ());
  DONE;
}")

-- 
Rask Ingemann Lambertsen



More information about the Gcc mailing list