This is the mail archive of the gcc@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: gcc-4.5/4.4: Bug in .subreg1 pass?


On Feb 24, 2011, at 12:46 PM, Eric Botcazou wrote:

>> Maybe the misunderstanding occurs when the mode of the subreg is less
>> than word_size?  It would certainly make sense that a subreg write of
>> less than word_size leaves the bits undefined.
>> 
>> ie, if word_size is SImode and we had a write to
>> 
>> (subreg:HI (reg:SI) 0)
>> 
>> Then the upper bits are left undefined.
>> 
>> 
>> Contrast that to the same RTL, but word_size is HImode
>> 
>> (subreg:HI (reg:SI) 0)
>> 
>> Would leave the upper bits untouched.
> 
> That's the conventional wisdom I think.  Sub-word and word-sized subregs don't 
> behave the same, in particular when they are on the LHS of an assignment.

That's certainly what the manual says.

	paul



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