altivec is not the only simd arch
Daniel Egger
degger@fhm.edu
Tue May 21 08:59:00 GMT 2002
Am Die, 2002-05-21 um 02.00 schrieb Aldy Hernandez:
> not exactly, i have code so we can do:
>
> int foo, bar, zed __attribute__((mode(V4SI)))
>
> foo = bar;
> zed = foo + bar;
> and this will work even if you don't have V4SI in your architecture.
> somewhat analogous to having "long long" be 64-bit (DImode), even
> if your architecture only does 32-bits.
> then there's the other part of my patch that will allow [certain] operators
> to work on the SIMD types (=, +, -, *, etc). this was discussed a while
> ago and was accepted on the condition that it be documented and
> implemented to behave as VALARRAYS. i'll be doing that as well.
This seems ambiguous to me, what exactly is the example supposed to
produce and how will [certain] operators work on SIMD types? I guess
they will use the type of the variable to determine the type of elements
the operator applies to, but after all there are different operations
that could be mapped to a single '+' for instance; would that be a
saturated operation or a wrapping one? What do you do for a '*'; a full
size result multiplication resulting in two vector types or in one
overwriting some elements, a high multiplication, a low multiplication
or a wrapping one?
I already though about this intensively but came to conclusion...
--
Servus,
Daniel
More information about the Gcc-patches
mailing list