This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix LRA subreg calculation for big-endian targets
- From: Richard Sandiford <richard dot sandiford at linaro dot org>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 31 Jan 2018 19:06:58 +0000
- Subject: Re: Fix LRA subreg calculation for big-endian targets
- Authentication-results: sourceware.org; auth=none
- References: <87inbopx9c.fsf@linaro.org> <20180131162833.GP21977@gate.crashing.org>
Segher Boessenkool <segher@kernel.crashing.org> writes:
> Hi!
>
> On Fri, Jan 26, 2018 at 01:25:51PM +0000, Richard Sandiford wrote:
>> if (SCALAR_INT_MODE_P (inmode))
>> new_out_reg = gen_lowpart_SUBREG (outmode, reg);
>> else
>> - new_out_reg = gen_rtx_SUBREG (outmode, reg, 0);
>> + {
>> + poly_uint64 offset = subreg_lowpart_offset (outmode, inmode);
>> + new_out_reg = gen_rtx_SUBREG (outmode, reg, offset);
>> + }
>
> Is this now not exactly the same as the SCALAR_INT_MODE_P case? The mode
> of "reg" is inmode, after all?
Bah, yes. Don't know how I missed that. :-( I think I must have
been reading it as SCALAR_INT_P, and thinking this was some weird
VOIDmode thing.
Will fix.
Thanks,
Richard