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: Fix LRA subreg calculation for big-endian targets


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


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