Baby's First AldyVec/AltiVec patch

Zack Weinberg zack@codesourcery.com
Sat Dec 20 01:36:00 GMT 2003


Ziemowit Laski <zlaski@apple.com> writes:

> Here's my first take at integrating AldyVec with AltiVec in the
> FSF TOT compiler.  With it, you can build the compiler and hand-run
> the AldyVec/AltiVec test cases (both old and new).  I have not tried
> bootstrapping or running the complete test suite yet, will do that next.

I don't know what "AldyVec" is.

> Here's an executive summary of what this patch accomplishes:
>    (1) Adds a '-faltivec' switch (for Darwin targets only), which is
>        similar to '-maltivec' except that the <altivec.h> header gets
>        pulled in automatically as well.
>    (2) Adds support for context-sensitive keywords.  This is accomplished
>        via what I call "conditional macros", whereby a predicate is
> evaluated
>        to decide whether a macro (in our case, "vector", "pixel",
> etc.) should
>        be expanded or not.  This is controlled by a target hook, and is
>        turned off completely unless you specify '-maltivec' or
> '-faltivec'.
>    (3) Adds support for 'vector pixel' and 'vector bool ...' types as
>        _distinct_ from 'vector unsigned ...' (This was missing from
> AldyVec),
>        and adds canonical name-mangling for the AltiVec types.
>    (4) Adds support for treating comma expressions, when cast to a
> vector type,
>        as vector initializers (e.g., "(vector signed int)(1, 2, 3,
> 4)"), as
>        the Apple/Motorola AltiVec syntax requires.  The AldyVec
> array-style
>        initializers ("{1, 2, 3, 4}") are supported as well.

It was my understanding that the (vector TYPE) (1, 2, 3, 4) notation
was deprecated in the official Apple/Motorola AltiVec specification,
and it was also my understanding that the GCC maintainers had agreed
that this notation would never be supported by GCC.  In fact, all of
the features of your patch, I believe, were considered for inclusion
in the past and firmly rejected.

zw



More information about the Gcc-patches mailing list