On Mon, Aug 22, 2016 at 11:25:01AM +0200, Bernd Schmidt wrote:
> On 08/20/2016 07:07 PM, tbsaunde+...@tbsaunde.org wrote:
> > From: Trevor Saunders <tbsaunde+...@tbsaunde.org>
> > 
> > Hi,
> > 
> > its kind of silly, and this allows us to remove a few more #ifdefs.
> 
> >  #if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
> > -#if HARD_FRAME_POINTER_IS_ARG_POINTER
> > +#if HARD_FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM
> >    GR_ARG_POINTER = GR_HARD_FRAME_POINTER,
> >  #else
> >    GR_ARG_POINTER,
> 
> I think this test here is the reason it's needed - arm.h has the only
> non-default definition of H_F_P_I_A_P, and there we have a definition that I
> think can't be evaluated by the preprocessor:
> 
> #define HARD_FRAME_POINTER_REGNUM               \
>   (TARGET_ARM                                   \
>    ? ARM_HARD_FRAME_POINTER_REGNUM              \
>    : THUMB_HARD_FRAME_POINTER_REGNUM)
> 
> Note that this is actually documented in one of the pieces removed by your
> patch:
> 
> @defmac HARD_FRAME_POINTER_IS_ARG_POINTER
> Define this to a preprocessor constant that is nonzero if
> @code{hard_frame_pointer_rtx} and @code{arg_pointer_rtx} should be the
> same.  The default definition is @samp{(HARD_FRAME_POINTER_REGNUM ==
> ARG_POINTER_REGNUM)}; you only need to define this macro if that
> definition is not suitable for use in preprocessor conditionals.
> @end defmac

yeah, it already got discussed, but basically I'm silly for somehow
thinking TARGET_ARM was constant, and then thinking the documentation
was obsolete :(

> You can probably remove most of the ifdefs without removing this macro.  > 

agreed, I'll repost without the config/ doc/ and rtl.h changes.

Trev

> 
> Bernd

Reply via email to