diff options
| author | Fangrui Song <maskray@google.com> | 2019-07-09 13:32:26 +0000 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2019-07-09 13:32:26 +0000 |
| commit | 04615341e48152ab8c3c17b368a14b155b5ffe34 (patch) | |
| tree | e3f5f4cfeac9e5a57ef192280c5b87b736a22104 /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | 51dad4196e58131c2c9df9e1eb4302b4c637aff5 (diff) | |
| download | bcm5719-llvm-04615341e48152ab8c3c17b368a14b155b5ffe34.tar.gz bcm5719-llvm-04615341e48152ab8c3c17b368a14b155b5ffe34.zip | |
[ItaniumMangle] Refactor long double/__float128 mangling and fix the mangled code
In gcc PowerPC, long double has 3 mangling schemes:
-mlong-double-64: `e`
-mlong-double-128 -mabi=ibmlongdouble: `g`
-mlong-double-128 -mabi=ieeelongdouble: `u9__ieee128` (gcc <= 8.1: `U10__float128`)
The current useFloat128ManglingForLongDouble() bisection is not suitable
when we support -mlong-double-128 in clang (D64277). Replace
useFloat128ManglingForLongDouble() with getLongDoubleMangling() and
getFloat128Mangling() to allow 3 mangling schemes.
I also deleted the `getTriple().isOSBinFormatELF()` check (the Darwin
support has gone: https://reviews.llvm.org/D50988).
For x86, change the mangled code of __float128 from `U10__float128` to `g`. `U10__float128` was wrongly copied from PowerPC.
The test will be added to `test/CodeGen/x86-long-double.cpp` in D64277.
Reviewed By: erichkeane
Differential Revision: https://reviews.llvm.org/D64276
llvm-svn: 365480
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions

