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: SH2A: "RTV/N Rn" implementation


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


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