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/15106] Vector varargs failure for AltiVec on ppc32 linux


On Tue, Apr 27, 2004 at 01:02:29PM +0200, Hartmut Penner wrote:
> Hello,
>       Janis posted a bug with a testcase, where all valid combination of
> -maltivec and -mabi=altivec are used. This testcase discovered some
> shortcomings
> on ppc32 & ppc64 linux regarding AltiVec.
> 
> Pls take a look at following proposed fix, it is only a draft, need to
> fully test etc.
> 
> It fixes testcase except for the combination -maltivec -mabi=no-altivec on
> ppc64,
> which I consider a invalid combination.
> 
>       regards, Hartmut

Hi Hartmut,
  We're working on the same bug again.  :)

> Index: gcc/config/rs6000/rs6000.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
> retrieving revision 1.630
> diff -u -p -r1.630 rs6000.c
> --- gcc/config/rs6000/rs6000.c      24 Apr 2004 06:37:18 -0000    1.630
> +++ gcc/config/rs6000/rs6000.c      27 Apr 2004 11:00:02 -0000
> @@ -4481,7 +4481,7 @@ function_arg (CUMULATIVE_ARGS *cum, enum
>           n_words = rs6000_arg_size (mode, type);
> 
>         /* Long long and SPE vectors are put in odd registers.  */
> -       if (n_words == 2 && (gregno & 1) == 0)
> +       if (n_words >= 2 && (gregno & 1) == 0)
>           gregno += 1;

This I disagree with.  It changes the calling convention for -m32
-mno-altivec -mabi=no-altivec functions that use vector args, both
varargs and non-varags.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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