This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug target/14960] -maltivec affects vector return with -mabi=no-altivec


Imagine this scenario:

  a library built with -mno-altivec, and within this library a
  function which accepts vectors in a variable-length argument list

  an application built with -maltivec that passes vectors to that
  library function

This is required for the dreaded vfprintf and presumably would someday
be used for other library functionionality as well.  I've attached a
small test case that compiles the caller and callee in various ways.
On powerpc64-linux with -m64 the test passes except when the callee is
compiled with "-maltivec -mabi=no-altivec".  For -m32 it fails except
when the callee is compiled with "-maltivec -mabi=altivec", meaning that
with -m32 there is no successful way to build the library for the
scenario above.  This testing used mainline plus recent Altivec patches
from Hartmut and Fariborz.

Which combinations of options are supposed to work for the two pieces
of this test?  Is the answer the same for -m32 and -m64?  I would think
that as long as the same ABI is used for both, it should work.

Janis

Attachment: vector_bug4.tar.gz
Description: GNU Zip compressed data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]