*_BY_PIECES_P flaw

James E Wilson wilson@specifixinc.com
Fri Aug 6 21:00:00 GMT 2004


Jakub Jelinek wrote:
> I think best would be to add a max_size argument to this function,
> which would be MOVE_MAX_PIECES + 1 or STORE_MAX_PIECES + 1 depending
> on in which macro or routine it is used.

I think all of the uses of MOVE_MAX in expr.c are pointless, since we 
will never consider anything bigger than MOVE_MAX_PIECES.  However, 
since we have STORE_MAX_PIECES, and it may be different than 
MOVE_MAX_PIECES, I think your suggestion is right.  We need to pass in 
the appropriate *_MAX_PIECES value to move_by_pieces_ninsns.

> Such change would need perhaps some corrections to i386, x86_64 and SH
> MOVE_RATIO/CLEAR_RATIO/MOVE_BY_PIECES_P settings.

The x86 CLEAR_RATIO should perhaps be the same as the x86 MOVE_RATIO. 
And of course the MOVE_BY_PIECES_P macro in the sh port has to change if 
we add another option to move_by_pieces_ninsns.  Otherwise, it isn't 
clear that anything else has to change.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list