This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] set -mabi=altivec with -ftree-vectorize
- From: Daniel Jacobowitz <drow at false dot org>
- To: David Edelsohn <dje at watson dot ibm dot com>, Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 7 Aug 2007 22:21:53 -0400
- Subject: Re: [patch] set -mabi=altivec with -ftree-vectorize
- References: <20070731071457.GB32641@kam.mff.cuni.cz> <20070731110821.GA7127@caradoc.them.org> <200707311202.l6VC2C6U029180@makai.watson.ibm.com> <20070731132042.GA10523@caradoc.them.org> <20070807153553.GA3577@caradoc.them.org>
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