When is it valid to use RTX_FRAME_RELATED_P ?
Richard Earnshaw
rearnsha@arm.com
Wed Jun 26 03:13:00 GMT 2002
> I'm trying to find out why gcc-3.2 cvs builds (with checking enabled) fail on arm-linux.
>
> The first problem that I had to resolve was with 'CONSTANT_POOL_ADDRESS_P'
> where Krister came up with a solution in
> <http://gcc.gnu.org/ml/gcc-patches/2002-06/msg00365.html>
>
> (although I would rather rewrite it as :
>
> #define LEGITIMATE_PIC_OPERAND_P(X) \
> ( ! symbol_mentioned_p (X) \
> && ! label_mentioned_p (X) \
> && (! ((GET_CODE(X) == SYMBOL_REF) && CONSTANT_POOL_ADDRESS_P (X)) \
> || ( ! symbol_mentioned_p (get_pool_constant (X)) \
> && ! label_mentioned_p (get_pool_constant (X)))))
>
> )
>
> )
>
This statement needs rearranging to remove all those inversions, it can be
written much more cleanly as:
(!(symbol_mentioned_p (X)
|| label_mentioned_p (X)
|| (GET_CODE (X) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (X)
&& (symbol_mentioned_p (get_pool_constant (X))
|| label_mentioned_p (get_pool_constant (X))))))
> static rtx
> emit_sfm (base_reg, count)
> int base_reg;
> int count;
> {
> rtx par;
> rtx dwarf;
> rtx tmp, reg;
> int i;
>
> par = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (count));
> dwarf = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (count));
> RTX_FRAME_RELATED_P (dwarf) = 1; /* <==== here it fails*/
>
> reg = gen_rtx_REG (XFmode, base_reg++);
> [...]
>
>
> So what should I do now ? RTX_FRAME_RELATED_P doesn't expect 'parallel', but
> in arm.c we explicitely create a parallel and set the RTX_FRAME_RELATED_P for it ??
>
Simply delete the line where we set RTX_FRAME_RELATED_P for 'dwarf'. The
argument goes: this expression is only used inside a
REG_FRAME_RELATED_EXPR note, so we don't need to annotate it further.
R.
More information about the Gcc
mailing list