This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, ARM, LRA] Prepare ARM build with LRA


> Indeed, I think it has to be the mode of loc, but I just wonder if it
> is not always the same, as in the doc it is written that mode m is the
> same as the mode that would be used for loc if it were a register.

So can we assert that we have a REG here and use GET_MODE (XEXP (x, 0))?  Or 
else return false if we don't have a REG.

> According to gcc internals, ROTATE and ROTATERT are similar to the
> shifting operations, but to be more accurate maybe we can rename
> shif_code_p in shift_and _rotate_code_p rotation are used in arm
> address calculation, and thus need to be handle in  must_be_index_p
> and set_address_index

Egad.  I guess I just wanted to see it written down. :-)

Btw, are you sure that you don't need to modify must_be_index_p instead?

/* Return true if X must be an index rather than a base.  */

static bool
must_be_index_p (rtx x)
{
  return GET_CODE (x) == MULT || GET_CODE (x) == ASHIFT;
}

and call it from set_address_index?

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]