mangling vector types

Jason Merrill jason at redhat.com
Tue Nov 10 20:10:39 UTC 2009


G++ has been using U8__vector<type> for mangling vector types forever, 
which has been an increasing problem as vector types become more 
prevalent--primarily because the mangling doesn't specify the number of 
elements in the vector, and processors are continuing to support more 
and more different vector sizes.

I assume that other compilers need to deal with vector types as well, so 
they ought to be part of the standard ABI.

I'm thinking

  Dv <length> <element type>

A compact representation of the length would be the log2 of the number 
of elements.  However, this wouldn't work very well with template 
substitution, and it seems reasonable to want to write a template that 
will work on vectors of varying lengths, and indeed it's possible to do 
so in G++ now (though it won't work with deduction).

So I think that we want to just give the length.  But should it be in 
terms of elements or bytes?

Jason



More information about the cxx-abi-dev mailing list