On 10/28/2011 09:36 AM, Peter Bergner wrote:
> Oops, you're write. Had I compiled with -m64 -mcpu=power7 -mtune=476fp,
> I would have caught that. I guess (supposing we don't want to support
> 64-bit) I should have the following hunks instead, correct?
>
> + /* If not explicitly specified via option, decide whether to generate the
> + extra blr's required to preserve the link stack on some cpus (eg, 476).
> */
> + if (TARGET_LINK_STACK == -1)
> + SET_TARGET_LINK_STACK (rs6000_cpu == PROCESSOR_PPC476
> + && flag_pic
> + && !TARGET_POWERPC64);
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);
That first test could possibly be more refined, like testing AIX
calling conventions or DOT_SYMBOLS. But it hardly seems worthwhile.
r~