This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Vector types and type conversions
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: paolo dot bonzini at lu dot unisi dot ch (Paolo Bonzini)
- Cc: aph at redhat dot com (Andrew Haley), gcc at gcc dot gnu dot org (GCC Development)
- Date: Wed, 19 Apr 2006 11:38:21 -0400 (EDT)
- Subject: Re: Vector types and type conversions
> Of course, it is not practically doable, to have vector typecasts
> preserve values (FLOAT_EXPR) on SSE and bits (VIEW_CONVERT_EXPR) on
> Altivec. The availability of generic vector types, which were
> overhauled in order to provide portable vector support even for machines
> without SIMD hardware, makes it harder to even propose this...
Besides the fact SSE already depends on VCE :).
Also in the SPU specs, the altivec style is optional but we still
require the preserve bits form of the cast.
In fact I thought this was documented this way.
t is possible to cast from one vector type to another, provided they are of the same size (in fact, you can also cast vectors to and from other datatypes of the same size).
-- Pinski