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: [patch] set -mabi=altivec with -ftree-vectorize


On Tue, Aug 07, 2007 at 11:35:53AM -0400, Daniel Jacobowitz wrote:
> I have been working on patches which add a .gnu_attribute entry
> describing the vector ABI.  This is primarily for GDB's benefit, since
> a number of tests in its testsuite fail on -mabi=no-altivec if AltiVec
> hardware is detected.  But at the same time, I added support to the
> linker to warn if you mix -mabi=no-altivec and -mabi=altivec code.
> That caused a bunch of testcases in the GCC testsuite to fail.

It sounds like the warning, and the -maltivec changes, are both going
to require a couple of iterations.  The vector ABI attribute is
separate from using it for a linker warning, so I'd like to deal with
that one first.  Is just this bit OK?

> @@ -2316,8 +2316,14 @@ rs6000_file_start (void)
>  
>  #ifdef HAVE_AS_GNU_ATTRIBUTE
>    if (TARGET_32BIT && DEFAULT_ABI == ABI_V4)
> -    fprintf (file, "\t.gnu_attribute 4, %d\n",
> -	     (TARGET_HARD_FLOAT && TARGET_FPRS) ? 1 : 2);
> +    {
> +      fprintf (file, "\t.gnu_attribute 4, %d\n",
> +	       (TARGET_HARD_FLOAT && TARGET_FPRS) ? 1 : 2);
> +      fprintf (file, "\t.gnu_attribute 8, %d\n",
> +	       (TARGET_ALTIVEC_ABI ? 2
> +		: TARGET_SPE_ABI ? 3
> +		: 1));
> +    }
>  #endif
>  
>    if (DEFAULT_ABI == ABI_AIX || (TARGET_ELF && flag_pic == 2))

-- 
Daniel Jacobowitz
CodeSourcery


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