This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: When is it valid to use RTX_FRAME_RELATED_P ?
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: jeroen dobbelaere <jeroen dot dobbelaere at acunia dot com>
- Cc: gcc at gcc dot gnu dot org, cato at df dot lth dot se, Richard dot Earnshaw at arm dot com
- Date: Wed, 26 Jun 2002 09:44:47 +0100
- Subject: Re: When is it valid to use RTX_FRAME_RELATED_P ?
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> 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.