This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, ARM, LRA] Prepare ARM build with LRA
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Yvan Roux <yvan dot roux at linaro dot org>
- Cc: gcc-patches at gcc dot gnu dot org, Vladimir Makarov <vmakarov at redhat dot com>, "rdsandiford at googlemail dot com" <rdsandiford at googlemail dot com>, Richard Earnshaw <rearnsha at arm dot com>, Marcus Shawcroft <marcus dot shawcroft at arm dot com>, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>, Matthew Gretton-Dann <matthew dot gretton-dann at linaro dot org>, Patch Tracking <patches at linaro dot org>, Richard Henderson <rth at redhat dot com>
- Date: Tue, 24 Sep 2013 16:43:22 +0200
- Subject: Re: [PATCH, ARM, LRA] Prepare ARM build with LRA
- Authentication-results: sourceware.org; auth=none
- References: <CAD57uCfrF9Ns=jghNJOD07p5wg+_zcTc6wmfOknau3iSg4FvWg at mail dot gmail dot com> <1453242 dot WdQ8ekkeyQ at polaris> <CAD57uCcH9Pq2stL2MPG07Sy=D+_ifxDGL-0RdLCCgouzA_7eVw at mail dot gmail dot com>
> 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. */
must_be_index_p (rtx x)
return GET_CODE (x) == MULT || GET_CODE (x) == ASHIFT;
and call it from set_address_index?