public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kumar Gala <kumar@chaos.ph.utexas.edu>
To: gcc@gcc.gnu.org
Subject: AltiVec support in GCC
Date: Thu, 17 Feb 2000 20:30:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.10.10002172046000.23769-100000@chaos.ph.utexas.edu> (raw)

I am new this list and wanted to start up a discussion on this issues with
getting AltiVec support into GCC.  I am aware that Motorola has worked on
a set of patches against GCC 2.95.2, binutils, gdb, and are in the process
of assigning the copyright to the FSF/GNU.

The major issues that I have been told about, surrounds the fact that the
Motorola changes add a 'vector' primitive.  

(ie)

vector pixel
vector float
vector short
vector int
vector char
vector bool
...

These are the major AltiVec docs.
http://www.mot.com/SPS/PowerPC/teksupport/teklibrary/manuals/altivec_pem.pdf
http://www.mot.com/SPS/PowerPC/teksupport/teklibrary/manuals/altivecpim.pdf

The PEM documents the assembly level instructions that AltiVec is composed
of.  The PIM documents the C/C++ extensions.  It also discusses ABI
changes and the such.  The patches that Motorola have done following the
PIM.

The rest of the PIM documents the C API.  To clarify what some people have
said on this list, the C API is much more like 'c' function calls then
overloaded operators in c++.

for example to add to vectors you would do the following code

   vector int a, b, c;
   vec_add(a,b,c)  /* a + b = c */

Also, people have discussed the creation of auto-vectorizing compilers.
While this can be useful for the simple case, from the AltiVec code I
think it would be very diffucult to get full use of the AltiVec
instruction set. 

There are instructions like vec_perm, vec_max, vec_min, vec_avg.  That
would be very diffucult for any auto-vectorizing utility to use.  Some of
these operations provide the greatest benefit.  For one example, some 2-d
median code developed at Motorola has shown a 30-40x speedup with the use
of altivec due to these unique instructions.  Also, these operations allow
the coder to think in new/creative ways.

I also believe it is time that SIMD is taken more seriously.  I believe
that the AltiVec SIMD engine provides one of the more robust set of
instructions to the programmer (as apposed to MMX, SSE, etc).  While SIMD
may not be ment for the general programmer it may well be that the general
programmer will unknowingly use it.  Here's a list of ideas that I have
had for places where AltiVec could enhance performance.

Software RAID code (XOR), high bandwidth memory operations (128 bit data
paths), String manipluations, encryption (take a look at the latest
powerpc rc5 client), checksums.  GIMP, MESA.  

The reason I am brinking this up know is that I think the sooner the
discussion starts about this the faster programmers well have access to
it and the better for everyone.  

I am looking into getting the patches from Motorola and have a contact for
anyone interested.  

thanks

 - kumar gala


ignorance is bliss.







             reply	other threads:[~2000-02-17 20:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-17 20:30 Kumar Gala [this message]
2000-02-18 17:13 Mike Stump
2000-02-18 18:04 ` Stan Shebs
2000-02-20 10:56 ` Richard Henderson
2000-02-18 18:47 Mike Stump
2000-02-19 15:03 ` Geoff Keating
2003-04-08 10:10 altivec support in gcc Michel LESPINASSE
2003-04-09 16:57 ` Aldy Hernandez
2003-04-09 22:55   ` Michel LESPINASSE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.10.10002172046000.23769-100000@chaos.ph.utexas.edu \
    --to=kumar@chaos.ph.utexas.edu \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).