[PATCH] checking version of rtl flag access macros
Janis Johnson
janis187@us.ibm.com
Wed May 15 17:17:00 GMT 2002
On Thu, May 16, 2002 at 02:05:24AM +0200, Krister Walfridsson wrote:
> On Mon, 6 May 2002, Janis Johnson wrote:
>
> > 2002-05-06 Janis Johnson <janis187@us.ibm.com>
> >
> > * rtl.h (struct rtx_def): Update comments.
> > (RTL_FLAG_CHECK[12345678]): New. (rtl_check_failed_flag): Declare.
> > (RTL_FLAG): New. (CLEAR_RTX_FLAGS): New. (flag access macros): Use
> > RTL_FLAG_CHECK macros with list of expected RTL codes.
> > * rtl.c (copy_rtx, shallow_copy_rtx): Use RTX_FLAG macro.
> > (rtl_check_failed_flag): New.
> > * reload1.c (reload): Use REG macro before changing rtx to MEM.
> > (reload_cse_noop_set_p): Check rtx code before using access macro.
> > * config/ia64/ia64.c (process_for_unwind_directive): Check rtx code
> > before using access macro.
>
> The reload1.c part of this patch causes bootstrap failure for
> arm-unknown-netbsd1.5Y. I don't claim to understand gcc internals,
> but shouldn't the line below read "if (GET_CODE (body) == SET"?
>
> > @@ -8079,7 +8079,8 @@ reload_cse_simplify (insn)
> > if (!count && reload_cse_noop_set_p (body))
> > {
> > rtx value = SET_DEST (body);
> > - if (! REG_FUNCTION_VALUE_P (SET_DEST (body)))
> > + if (GET_CODE (body) == REG
> > + && ! REG_FUNCTION_VALUE_P (SET_DEST (body)))
> > value = 0;
> > reload_cse_delete_noop_set (insn, value);
> > return;
>
> /Krister
>
Eww. It was supposed to verify that the argument to REG_FUNCTION_VALUE_P
is REG, so it should be "GET_CODE (SET_DEST (body)) == REG". Can you try
that on your system?
Janis
More information about the Gcc-patches
mailing list