New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importer support for float80 #14971

Merged
merged 3 commits into from Mar 7, 2018

Conversation

Projects
None yet
3 participants
@stephentyrone
Member

stephentyrone commented Mar 5, 2018

Teach the importer to map between C's long double type and Float80 on non-Windows x86_64 and i386 platforms, and take advantage of this mapping to clean up a few details in the stdlib.

This also makes available the full set of platform math functions for Float80.

Resolves SR-2046.

@stephentyrone

This comment has been minimized.

Member

stephentyrone commented Mar 5, 2018

@swift-ci Please test.

@stephentyrone

This comment has been minimized.

Member

stephentyrone commented Mar 7, 2018

@moiseev The stdlib changes here are pretty minimal, but can you take a quick look?

@jrose-apple

This comment has been minimized.

Member

jrose-apple commented Mar 7, 2018

Importer side looks good, and none of the rest looks like anything alarming.

@stephentyrone stephentyrone merged commit f8a9e56 into apple:master Mar 7, 2018

4 checks passed

Swift Test Linux Platform 10820 tests run, 0 skipped, 0 failed.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform 54205 tests run, 0 skipped, 0 failed.
Details
Swift Test OS X Platform (smoke test)
Details

@stephentyrone stephentyrone deleted the stephentyrone:importer-support-for-Float80 branch Mar 7, 2018

@vivkong

This comment has been minimized.

Contributor

vivkong commented Mar 8, 2018

Got build failures on Linux on Z (s390x) related to this commit:

/home/swiftbuild/workspace/Swift/CONFIG/FIVE/GIT_BRANCH/master/label/csz25097/swift/stdlib/public/Platform/tgmath.swift.gyb:207:34: error: 'Float80' is unavailable: Float80 is only available on non-Windows x86 targets.
09:08:10 public func cos(_ x: Float80) -> Float80 {
09:08:10                                  ^~~~~~~
09:08:10 Swift.Float80:2:15: note: 'Float80' has been explicitly marked unavailable here
09:08:10 public struct Float80 {
09:08:10               ^
09:08:10 /home/swiftbuild/workspace/Swift/CONFIG/FIVE/GIT_BRANCH/master/label/csz25097/swift/stdlib/public/Platform/tgmath.swift.gyb:207:22: error: 'Float80' is unavailable: Float80 is only available on non-Windows x86 targets.
09:08:10 public func cos(_ x: Float80) -> Float80 {
09:08:10                      ^~~~~~~
09:08:10 Swift.Float80:2:15: note: 'Float80' has been explicitly marked unavailable here
09:08:10 public struct Float80 {
09:08:10               ^

(and others)

Any ideas on how to fix this? Thanks

@jrose-apple

This comment has been minimized.

Member

jrose-apple commented Mar 8, 2018

Looks like Steve forgot one of the #if blocks, the one for OverlayFloatTypes. Feel free to put up a PR for that if you don't want to wait for him.

@vivkong

This comment has been minimized.

Contributor

vivkong commented Mar 8, 2018

ah OK. I have a patch ready. Will create a PR. Thanks @jrose-apple!

@stephentyrone

This comment has been minimized.

Member

stephentyrone commented Mar 8, 2018

Great, thanks @vivkong! I'm happy to review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment