This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: patch to build GCC for arm with LRA
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Yvan Roux <yvan dot roux at linaro dot org>
- Cc: Vladimir Makarov <vmakarov at redhat dot com>, Richard Earnshaw <rearnsha at arm dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, 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>, Richard Henderson <rth at redhat dot com>
- Date: Tue, 10 Sep 2013 20:20:11 +0100
- Subject: Re: RFC: patch to build GCC for arm with LRA
- Authentication-results: sourceware.org; auth=none
- References: <CAD57uCfSsANZvkMHmKphMHRnAxJNXGBxGEmSfhHSYwR7Jg9H-Q at mail dot gmail dot com> <877geri40k dot fsf at talisman dot default> <522D06E4 dot 1050602 at redhat dot com> <CAD57uCfpzd-7fKODP1oyWhY9f1QW2J=3BpMT3LAUMqC82Xvy0g at mail dot gmail dot com> <87zjrmgytu dot fsf at talisman dot default> <87vc2agymo dot fsf at talisman dot default> <CAD57uCfU3LMX+JM3yaJopqsp_rkJ3oyJv5g5VmJ5-9iyQvEMvQ at mail dot gmail dot com> <87wqmpg5n4 dot fsf at talisman dot default> <CAD57uCe-GrDqMHTNWtFcLRNDDVVr0_ZUg5E+zwaJdkCquNHagQ at mail dot gmail dot com>
Yvan Roux <yvan.roux@linaro.org> writes:
>> Yeah, but that's because strip_address_mutations doesn't consider
>> SIGN_EXTRACT to be a "mutation" as things stand. My point was that
>> I think it should, at least for the special extract-from-lsb case.
>> It then shouldn't be necessary to handle SIGN_EXTRACT in the other
>> address-analysis routines.
>>
>> (That might be what you meant, sorry, just thought I'd say in case.)
>
> You did well. I wanted to handle it in strip_address_mutation, but
> misread the code and thought that it wasn't called all the time, but
> in any case I didn't thought to the endianness issue. I've added
> ZERO_EXTRACT too in this treatment, but wonder if for the big endian
> case the third operand has to be taken into account, like this:
>
> GET_MODE_PRECISION(mode) - size - pos
Endianness in the BYTES_BIG_ENDIAN sense shouldn't be a problem AFAIK.
We just need to worry about BITS_BIG_ENDIAN. For:
({sign,zero}_extract:m X len pos)
"pos" counts from the lsb if !BITS_BIG_ENDIAN and from the msb if
BITS_BIG_ENDIAN. So I think the condition should be something like:
pos == (BITS_BIG_ENDIAN ? GET_MODE_PRECISION (m) - len : 0)
Agreed that it makes sense to handle ZERO_EXTRACT in the same way.
Thanks,
counts