NaCl is a platform where long double is the same as double.
Its mangling is spelled with "long double" but its ABI lowering is the same
as double.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I'm not an expert in mangling, and I'm not 100% sure if this is right. The Itanium ABI's spec lists "long double" as the same as __float80. Should we use "double" in mangling instead?
If you can have different overloads between double and long double, we need a separate mangling.
Looks like all the other unix targets that use IEEEDouble as their format do this too, including all the NaCl compilers.
If there were only two different types,
we should have mangled name 'd' for double and 'e' for long double,
even if their implementations are the same.
The problem came when g++ has float80 and float128 types,
and long double could be implemented as float80 or float128.
Then 'e' is used for float80, 'g' for float128,
and 'long double' has mangled name 'e' or 'g', depending on whether
it is float80 or float128.
Yes, so far I know only Android and powerpc use fp128 for long double on x86_64.