public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/54602] [SH] Register pop insn not put in rts delay slot
Date: Tue, 09 Oct 2012 22:58:00 -0000 [thread overview]
Message-ID: <bug-54602-4-d0uFsnHFNc@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54602-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54602
--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-10-09 22:57:40 UTC ---
(In reply to comment #1)
> The problem is the "*movsi_pop" insn. It prevents delay-slot stuffing of pop
> insns on everything < SH3. This was probably added to avoid pop insns in
> interrupt handler functions, which return with 'rte' instead of 'rts', see PR
> 53689.
> Adding "&& current_function_interrupt" to the condition of the "*movsi_pop"
> insn fixes the problem, while maintaining correct code for interrupt handler
> functions.
>
> There is also the following in sh.md:
>
> (define_delay
> (eq_attr "type" "return")
> [(and (eq_attr "in_delay_slot" "yes")
> (ior (and (eq_attr "interrupt_function" "no")
> (eq_attr "type" "!pload,prset"))
> (and (eq_attr "interrupt_function" "yes")
> (ior
> (not (match_test "TARGET_SH3"))
> (eq_attr "hit_stack" "no")
> (eq_attr "banked" "no"))))) (nil) (nil)])
>
> which should actually prevent normal movsi pop insn from slipping into the
> delay slot. I've tapped the "hit_stack" test and it is not invoked for
> interrupt functions for some reason ....
... because this define_delay applies for return insns, not for mem loads.
D'uh. :T
next prev parent reply other threads:[~2012-10-09 22:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-16 15:26 [Bug target/54602] New: " olegendo at gcc dot gnu.org
2012-10-09 22:52 ` [Bug target/54602] " olegendo at gcc dot gnu.org
2012-10-09 22:58 ` olegendo at gcc dot gnu.org [this message]
2012-10-10 0:44 ` olegendo at gcc dot gnu.org
2012-10-10 22:44 ` kkojima at gcc dot gnu.org
2012-10-10 23:24 ` olegendo at gcc dot gnu.org
2012-10-11 13:48 ` olegendo at gcc dot gnu.org
2012-10-12 23:23 ` olegendo at gcc dot gnu.org
2012-10-30 1:26 ` olegendo at gcc dot gnu.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-54602-4-d0uFsnHFNc@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).