This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: IQ2000: Generate a return insn as a branch
- From: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: scox at redhat dot com, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 28 Oct 2004 14:23:17 +0100
- Subject: Re: RFA: IQ2000: Generate a return insn as a branch
- Organization: GNU
- References: <m3is8vc797.fsf@redhat.com>
On Thu, 2004-10-28 at 14:16, Nick Clifton wrote:
> Hi Stan,
>
> Please can I apply the following patch to the iq2000 backend for GCC
> ? It fixes a problem in iq2000_expand_epilogue() where the return
> insn was being generated via an emit_insn() call rather than an
> emit_jump_insn().
>
> I discovered this problem when I noticed that gcc was mis-compiling
> libgloss/iq2000/trap.c. The post-reload scheduler was moving the
> return insn in the __trap0() function to the start of the code,
> before all of the "asm volatile..." statements! With this patch
> applied this no longer happens.
>
> Cheers
> Nick
>
> 2004-10-28 Nick Clifton <nickc@redhat.com>
>
> * config/iq2000/iq2000.c (iq2000_expand_epilogue): Use
> emit_jump_insn() to generate the return instruction.
OK. I would have said this was obvious...
R.