[cfe-dev] [libc++abi] demangle fails to handle SSE2 types

Luc Bourhis luc_j_bourhis at mac.com
Wed May 23 08:12:53 PDT 2012


On 23 May 2012, at 16:01, Howard Hinnant wrote:

> It does include a mangling for vendor extended types, and it is a shame that the ABI hasn't been followed for these types (prefix with 'u'), but oh well.

For the record, g++ follows that ABI. The demangling is unfortunately not symmetric, at least for g++ 4.6:

Type: __m64
Mangled: U8__vectori
Demangled: int __vector

Type: __m128
Mangled: U8__vectorf
Demangled: float __vector

Type: __m128d
Mangled: U8__vectord
Demangled: double __vector

Type: __m128i
Mangled: U8__vectorx
Demangled: long long __vector

I mention that because it can become annoying in the context of C++ programs generating C++ code (an exercise I indulge into on a regular basis): it would be nice if clang/libc++abi keeps it symmetric.

> If you'll tell me what string you would like to see these symbols demangle to, I'll put it on my to-do list.

Thanks! Here you are:

Type: __m64
Mangled: Dv1_x

Type: __m128
Mangled: Dv4_f

Type: __m128d
Mangled: Dv2_d

Type: __m128i
Mangled: Dv2_x

Type: __m256
Mangled: Dv8_f

Type: __m256d
Mangled: Dv4_d

Type: __m256i
Mangled: Dv4_x

The last 3 types are actually AVX types, a technology only available on Sandy Bridge platforms, and I had to run clang on a Linux machine because I don't have access to a Mac with those processors, but it should not matter as far as you are concerned. 

Best wishes,

Luc Bourhis




More information about the cfe-dev mailing list