[cxx-abi-dev] mangling vector types

David Vandevoorde daveed at edg.com
Tue Nov 10 21:18:18 UTC 2009


On Nov 10, 2009, at 3:10 PM, Jason Merrill wrote:

> 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.


Yes, it's been painful :-P


> 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>


Does that need a separator?  I know that element_type is currently  
only builtin types (and template parameters?), but it seems prudent to  
allow for future extension.

Maybe

	Dv <n_elements number> _ <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?


Elements, IMO.

	Daveed




More information about the cxx-abi-dev mailing list