This is the mail archive of the
mailing list for the GCC project.
Re: gcc + vector (v4sf) implementation guide
- From: Jim Wilson <wilson at specifixinc dot com>
- To: Dylan Cuthbert <dylan at q-games dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 26 Jan 2004 18:12:39 -0800
- Subject: Re: gcc + vector (v4sf) implementation guide
- References: <email@example.com>
Dylan Cuthbert wrote:
> Does anyone know of any documentation/examples or guidelines regarding
> implementing vector support for a new target description in gcc?
We generally don't have good documentation for this kind of thing.
There is a short "Vector Operations" node in gcc/doc/rtl.texi which
might be helpful.
> I have a new target description and I need to begin implementing support for
> vector types (v4sf etc), and wondered if there was anything special I had to
> do to enable this functionality? Can they be implemented in pretty much the
> same way as TImode types? (version of gcc is 3.2.3)
Yes, you just define md file patterns for them like you might do for
TImode types. However, since we don't have automatic vectorization, you
will also want to define built-in functions (intrinsics) that the user
can use to generate the vector instructions. You may also want to look
at the ABI support, to make sure passing/returning vectors works in a
reasonable way. Plus you will have to make whatever changes are
necessary to get this support working in your backend.
Look at other ports to see how they have solved these problems.
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com