This PR is meant to be a central place to record information about this issue.

The default ABI for 32-bit PowerPC GNU/Linux does not pass vectors in AltiVec
registers and does not save and restore AltiVec registers in functions that use
those registers.  With -mabi=altivec, vectors are passed in AltiVec registers
and AltiVec registers used within a function are saved and restored.  This has
always been a problem if multiple functions in a call chain use AltiVec
registers without the AltiVec ABI, but it's become a more visible issue with
-ftree-vectorize included in -O3, particularly when the user specifies a CPU
that supports AltiVec and might not realize that those two options imply that
AltiVec registers will likely be used in multiple functions in a call stack
without saving and restoring them.

Two recent PRs that are due to this problem are 34038 and 34437.  A
somewhat-rel
ated PR is 33899.

There were some recent discussions of this issue:

  http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02159.html
  http://gcc.gnu.org/ml/gcc-patches/2007-08/msg00438.html

This ought to be fixed either by using the AltiVec ABI by default or by
changing the non-AltiVec ABI to save and restore AltiVec registers in functions
that use them.


-- 
           Summary: no-altivec ABI should be fixed or no longer be the
                    default
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: janis at gcc dot gnu dot org
GCC target triplet: powerpc-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34526

Reply via email to