On 10/28/2011 11:35 AM, Peter Bergner wrote:
> On Fri, 2011-10-28 at 09:44 -0700, Richard Henderson wrote:
>> Not quite. You can't allow the user to set TARGET_LINK_STACK either,
>> for 64-bit. Because it won't work without further fixups. More like
>>
>> if (TARGET_POWERPC64)
>> SET_TARGET_LINK_STACK (0);
>> if (TARGET_LINK_STACK == -1)
>> SET_TARGET_LINK_STACK (rs6000_cpu == PROCESSOR_PPC476 && flag_pic);
>
> Ah, I forgot about if the user explicitly uses -mpreserve-ppc476-link-stack.
> Ok, so how about if we also spit out a warning that we're implicitly disabling
> the link stack code rather than doing it silently? Like so:
>
> if (TARGET_POWERPC64)
> {
> if (TARGET_LINK_STACK > 0)
> warning (0, "-m64 disables -mpreserve-ppc476-link-stack");
> SET_TARGET_LINK_STACK (0);
> }
> else if (TARGET_LINK_STACK == -1)
> SET_TARGET_LINK_STACK (rs6000_cpu == PROCESSOR_PPC476 && flag_pic);
Fine by me. Final rs6000 approval is dje's bivouac.
r~