This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH]Construct canonical scaled address expression in IVOPT
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Bin Cheng <Bin dot Cheng at arm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 24 Sep 2013 11:36:02 +0100
- Subject: Re: [PATCH]Construct canonical scaled address expression in IVOPT
- Authentication-results: sourceware.org; auth=none
- References: <001001ceb5e8$486bfd80$d943f880$ at arm dot com> <CAFiYyc2WssVSvy29kfAOnCKgxVMuiGHTgDYdHfjKewZ_stHd7g at mail dot gmail dot com> <001401ceb8ee$2bd3ef80$837bce80$ at arm dot com> <CAFiYyc1-OLD5n4HKMJ2UBN-ty9k+80ZBUz4FS-QQTCj6HYgOxw at mail dot gmail dot com>
On 24/09/13 11:12, Richard Biener wrote:
> Or even [reg*scale] (not sure about that). But yes, at least reg*scale + offset
> and reg*scale + reg.
I can't conceive of a realistic case where one would want to scale the
base address. Scaling the offset is fine, but never the base. So
reg*scale+offset seems meaningless.
Base + Offset * Scale on the other hand makes much more sense.
Of course, this is all about terminology, so if you regard an immediate,
such as a symbol as an offset, then perhaps you have something close to
the original term, but I think then you've inverted things, since your
symbol is really the base, not the offset.