This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH SH]: Added pop insn to avoid delay slot scheduling
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: Kaushik dot Phatak at kpitcummins dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 01 Mar 2010 08:05:26 +0900 (JST)
- Subject: Re: [PATCH SH]: Added pop insn to avoid delay slot scheduling
- References: <F56EA673D3E56E48804FE2B0D23EFD2D21346D89CA@KCINPUNHJCMS01.kpit.com>
Kaushik Phatak <Kaushik.Phatak@kpitcummins.com> wrote:
> Please find below patch for SH which will prevent the generation of
> the pop instruction in the delay slot after 'rte'. For the 'sh' and
> 'sh2', the rte instruction reads the return pc from the stack and any
> pop in the delay slot crashes the hardware. A new predicate has been
> defined to implement this.
If you have a handy test case for the problem, it would be good
to add it to testsuite/gcc.target/sh/.
> +;; define additional pop for SH1 and SH2 so it does not get
> +;; placed in the delay slot
This should start with a capital letter and end with a period.
> +(define_insn "movsi_pop"
Use *movsi_pop instead of movsi_pop if there is no good reason
for it. The patch is OK for 4.6 with the above changes.
Regards,
kaz