* sh.c (sh_can_use_simple_return_p): Return false for SHmedia
and SHcompact using call_cookie.
* sh.md (epilogue): Emit non-inlined return insns for SHmedia
and SHcompact using call_cookie.
From-SVN: r192061
+2012-10-04 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * config/sh/sh.c (sh_can_use_simple_return_p): Return false for
+ SHmedia and SHcompact using call cookie.
+ * config/sh/sh.md (epilogue): Emit non-inlined return insns for
+ SHmedia and SHcompact using call cookie.
+
2012-10-03 Oleg Endo <olegendo@gcc.gnu.org>
PR target/51244
HARD_REG_SET live_regs_mask;
int d;
+ /* Some targets require special return insns. */
+ if (TARGET_SHMEDIA
+ || (TARGET_SHCOMPACT
+ && (crtl->args.info.call_cookie & CALL_COOKIE_RET_TRAMP (1))))
+ return false;
+
if (! reload_completed || frame_pointer_needed)
return false;
""
{
sh_expand_epilogue (false);
+ if (TARGET_SHMEDIA
+ || (TARGET_SHCOMPACT
+ && (crtl->args.info.call_cookie & CALL_COOKIE_RET_TRAMP (1))))
+ {
+ emit_jump_insn (gen_return ());
+ DONE;
+ }
})
(define_expand "eh_return"