This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sh-elf: PR target/15886
Joern Rennecke <joern.rennecke@superh.com> wrote:
> Yes, indeed. It appears it should use gen_rtx_MEM (Pmode, return_address_pointer_rtx) both for TARGET_SH5 and ! TARGET_SH5.
The patch you suggest fixes the problem for the small testcases.
I'll regtest it on sh-elf-3_5-branch and send it to gcc-patch if
there are no problems.
>> Is it wrong to just return NULL_RTX for that case?
>
> Yes, it is wrong, because that would invalidate the RETURN_ADDRESS_POINTER
> case of initial_elimination_offset.
I got it. Thanks for your suggestion and explanation.
Regards,
kaz