This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bug report.
- From: Jim Wilson <wilson at specifixinc dot com>
- To: Gargoyle Crazy Master <tanaka at boarderz dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 02 May 2004 17:20:34 -0700
- Subject: Re: bug report.
- References: <20040424.233233.41627032.wyvern@boarderz.com><408F385E.7010905@specifixinc.com> <20040501.211829.41627565.wyvern@boarderz.com>
On Sat, 2004-05-01 at 05:18, Gargoyle Crazy Master wrote:
> JUMP_INSN cannot simply be handled by return NULL_RTX.
If an insn contains one and only one set, then single_set returns a
pointer to the set.
A return insn contains no set, and thus single_set returns NULL for it.
This is not a bug in single_set. This is how it is supposed to work.
The fact that onlyjump_p can only return true for an insn if it contains
a set is maybe a bug in onlyjump_p, but we would need convincing
evidence of a problem before we change it.
> (define_insn "return"
> [(use LR_REGNUM)
> (return)]
> ""
This is wrong by the way. The return must be before the use.
Why does this not work? It would be helpful to have specifics. Are you
getting a compiler core dump? Are you getting bad code? It would be
useful to have a testcase, RTL dumps, and a pointer to where the core
dump or miscompilation happens.
It is a known problem that a jumps that use a parallel do not work as
well as jumps that contain only a set. This is fixable, it is just a
matter of some effort to find all of the places that need fixing.
Meanwhile, it is best to avoid using a parallel when it isn't necessary.
It should not be necessary to include LR_REGNUM in the return pattern.
The flow pass can get this info from EPILOGUE_USES. See the docs, and
various targets that define it for examples.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com