[PATCH] checking version of rtl flag access macros
Janis Johnson
janis187@us.ibm.com
Wed May 8 11:50:00 GMT 2002
On Wed, May 08, 2002 at 02:14:35PM -0400, John David Anglin wrote:
> > > > -/* 1 if insn is a branch that should not unconditionally execute its
> > > > - delay slots, i.e., it is an annulled branch. */
> > > > -#define INSN_ANNULLED_BRANCH_P(INSN) ((INSN)->unchanging)
> > > > +/* 1 in an INSN in the delay slot of a branch insn if an annulling branch
> > > > + should be used. */
> > > > +#define INSN_ANNULLED_BRANCH_P(RTX) (RTL_FLAG_CHECK1((RTX), INSN)->unchanging)
>
> > Your mail to gcc-bugs says that the macro is used with JUMP_INSN. If
>
> The comment for the macro indicates that the macro is for branch insns.
> The code INSN is used for insns that cannot jump. I believe that the
> check should be against both JUMP_INSN and CALL_INSN.
>
> The comment needs to be adjusted as INSN isn't an argument of the macro.
There were conflicting descriptions of what this flag means, and I
changed this comment to match the other descriptions; it's not for a
branch itself, it's for an instruction in the delay slot of a branch.
This version of the macro, requiring INSN_ANNULLED_BRANCH_P to be used
only with an rtx whose code is INSN, is successful with bootstrap
(everything but Ada) and regression testing on i686-pc-linux-gnu and
ia64-unknown-linux-gnu. It's possible that on some targets it's valid
for a JUMP_INSN to be in the delay slot of a branch; I'll let people
who are more knowledgeable about this than I am figure that out.
INSN in the comment refers to the expected rtx code. The new macros
RTL_FLAG_CHECK* take a list of rtx codes to compare against the code
of the rtx argument of the macro.
Janis
More information about the Gcc-patches
mailing list