This is the mail archive of the gcc-patches@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: [PATCH SH]: Added pop insn to avoid delay slot scheduling


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


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