On Mon, 2008-02-18 at 18:58 -0500, David Edelsohn wrote:
>       I misread Janis's latest patch that I approved.
> 
>       The patch was suppose to enable -mabi=altivec when -maltivec is
> enabled, not change the default ABI.
> 
>       For other OSes, -mabi=altivec is the default, so -maltivec just
> works and produces correct code.  If a user enables -maltivec on
> powerpc32-linux explicitly or implicitly (with -mcpu=970 or -mcpu=power6),
> presumably he or she want GCC to produce correct, self-consistent,
> ABI-compliant Altivec code.  Because no other OSes require an explicit
> invocation of -mabi=altivec and most users do not expect to need multiple
> commandline options for correct operation, users are confused.  Therefore,
> the plan is for -maltivec to imply -mabi=altivec for ppc32-linux.
> 
>       In summary, the patch is suppose to make -maltivec produce correct
> code on ppc32-linux.
> 
>       Mark, I appreciate your and Daniel's suggestions, but that is not
> what we wish to implement for ppc32-linux.

I was writing the following while David sent his mail above.  I agree
with him about what changes we should make.

I discussed this on IRC with David Edelsohn and others.  I plan to modify
the patch at http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00521.html to
set the default for the AltiVec ABI based on -maltivec; that patch had set
it by default.  That patch will continue to re-enable -mabi=no-altivec,
which had been broken since 4.0.  I had hoped to get this in before the
4.3 release but it probably won't make it and isn't worth holding up the
release.

I have a separate patch to fix the bug in gcc.c-torture/execute/va-arg-25.c
which has always been broken if compiled with -mabi=altivec and was exposed
in testing for last week's patch, which made it a regression.  If the
AltiVec ABI is only the default with -maltivec then that bug will no longer
be a regression for default options so I can wait and fix it more cleanly.

There is no ABI that defines saving and restoring AltiVec registers
without the rest of the AltiVec ABI, so I'll leave that alone.  Users who
explicity use "-maltivec -mabi=no-altivec" will get dangerous code.

There are lots of inconsistencies in passing generic vectors as arguments
and return values, and I'll leave those alone until the PowerPC ELF ABI
group decides what to do with them.

Janis

Reply via email to