This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH [6/n] X32: Supprot 32bit address
On Mon, Jul 18, 2011 at 8:48 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> TARGET_MEM_REF only works on ptr_mode. ? This patch allows 32bit address
>>> in x32 mode. ?OK for trunk?
>>
>> Do you perhaps have a testcase to help in analyzing the problem?
>>
>
> See:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49780
I don't think that tree-ssa-address/addr_for_mem_ref is correct when
REALLY_EXPAND is false. It constructs RTX "template" in pointer_mode,
which is not necessary valid and is rejected from
ix86_validate_address_p. When really expanding the expression, we have
a conversion at the end:
gen_addr_rtx (pointer_mode, sym, bse, idx, st, off, &address, NULL, NULL);
if (pointer_mode != address_mode)
address = convert_memory_address (address_mode, address);
return address;
This is in fact your r175912 change in the fix for PR47383 - you need
to do something with template as well...
Uros.