On Tue, Jul 5, 2011 at 4:56 PM, Ulrich Weigand <uweig...@de.ibm.com> wrote:
> H.J. Lu wrote:
>
>> > However, this still seems odd to me, as I had understood the address in
>> > a TARGET_MEM_REF needs to be an *address*, i.e. use address_mode. =A0If
>> > this is not true (has changed?) a lot of other places would need to
>> > change as well ...
>>
>> I was told that TARGET_MEM_REF needs ptr_mode.
>
> Can you elaborate?  We are talking about the mode returned from
> addr_for_mem_ref here.  I do now understand how this can be anything
> but an address mode:

That is an address mode, but the intermediate computation
(base + index * step + offset) is done in pointer mode.  The
code currently performs this in address mode as well which is
bogus.  Which is why I suggested to use pointer mode for the
computation (now, with the other target hook you mention) and
then convert the result to address mode.

Richard.

Reply via email to