[cft] subreg validation round 2

Bob Wilson bwilson@tensilica.com
Thu Nov 18 02:43:00 GMT 2004


Alan Modra wrote:
> On Wed, Nov 17, 2004 at 11:45:53AM -0800, Richard Henderson wrote:
> 
>>On Wed, Nov 17, 2004 at 11:18:41AM -0800, Bob Wilson wrote:
>>
>>>If so, should I change FUNCTION_ARG code to avoid 
>>>returning a BLKmode reg?  Should I wrap the REG in a PARALLEL?
>>
>>Presumably you didn't just return the SImode reg in the first place
>>because you want the three bytes in the high part of the register?
>>Then, yes, a PARALLEL should do.
> 
> 
> Or define a suitable BLOCK_REG_PADDING.  At least, that used to work..

I'm looking into it, but from a quick check of various other ports, I'm 
surprised that more of them aren't breaking.  (Or maybe they are....)  Many of 
the FUNCTION_ARG implementations create a REG with whatever mode is specified as 
an argument to FUNCTION_ARG, which is what the Xtensa code does.  I'm not doing 
anything special here.

The "smaller than a word struct argument" case that causes the ICE is actually 
the easiest to handle.  Ignoring the padding issue, a single SImode REG will 
work.  For a struct bigger than a word, I guess a PARALLEL is required to 
specify each consecutive register separately (at least in the general case where 
there is no mode of the right size).  I can see why it should be that way, but 
it was so much easier to just specify the first register with BLKmode....

Thanks for the suggestions.

--Bob



More information about the Gcc mailing list