[RFC] patch: Re: reg+reg addressing mode on SPARC

Jakub Jelinek jakub@redhat.com
Mon Aug 13 10:04:00 GMT 2001


On Mon, Aug 13, 2001 at 09:51:34AM -0700, Dan Nicolaescu wrote:
> Are you sure? (I have no idea...)
> Is anything taking into account that reg+reg is using 2 registers,
> thus increases the register pressure? 

By setting ADDRESS_COST to 2 for reg+reg and 1 otherwise you say that
add %reg1, %reg2, %reg3
ld [%reg3], %reg4
is as fast as
ld [%reg1 + %reg2], %reg4
which is not true. All addressing modes are expensive equally on all chips
I know of.

	Jakub



More information about the Gcc mailing list