primitive vector types

Daniel Keep daniel.keep.lists at gmail.com
Sat Feb 21 06:58:25 PST 2009



bearophile wrote:
> Michel Fortin:
>> Instead of introducing new a new type, couldn't float[4] be the one 
>> mapped to a vector type? Why do we need a new type?
> 
> Alignment requirements, shuffling operations, scalar operations on just the first item of the vector, ecc. It may be doable, and it may be even a nice idea, but probably it requires lot of care.
> 
> Bye,
> bearophile

Another advantage would be that you could specify in the ABI that this
vector type should be passed to and returned from functions via the XMM
registers.  You could make a specific exception for float[4], but that
just seems messy.

  -- Daniel



More information about the Digitalmars-d mailing list