This is the mail archive of the gcc@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: bug report.


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


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