swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.6k stars 10.37k forks source link

[SR-9072] Missing support for fp128 #51573

Open drodriguez opened 6 years ago

drodriguez commented 6 years ago
Previous ID SR-9072
Radar None
Original Reporter @drodriguez
Type Bug
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Standard Library | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: f77dd234a6e6517c919cae8f369e92b4

Issue Description:

AArch64/AAPCS64 EABI which Linux and Android follow for ARM 64 bits uses 128 bits floating point numbers for double long.

Swift doesn’t support Float128, nor Int128/UInt128 (which are necessary to represent the significand of a Float128).

Some starting work for supporting Int128/UInt128 is done in https://github.com/drodriguez/swift/commit/dd20b663bcc091119cf317c67013dae3c135b963

There is more discussion around the problem in https://github.com/apple/swift/pull/19846. When trying to support Android AArch64 a test was failing because double long from the headers is not imported in Swift, but it is tested. The solution in that PR is disabling the test for Android AArch64, but the real solution would be supporting fp128.

belkadan commented 6 years ago

cc @stephentyrone