Skip to content

Fix test case regressions on s390x arch #21841

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

Merged

Conversation

rposts
Copy link
Contributor

@rposts rposts commented Jan 14, 2019

Code refactoring in Remote/MetadataReader.h resulted in RemoteAST test case failures on s390x architecture. Specifically, RemoteAST/structural_types.swift

Problems happens in MetadataRef readMetadata(StoredPointer address) method when a Tuple metadata is read. On s390x architecture, numElements, is returned correctly when its type is restored back to StoredSize.

@rposts
Copy link
Contributor Author

rposts commented Jan 15, 2019

@jckarter This commit changed the size of numElements - I suspect on BE systems using StoredSize makes more sense as the size is stored in high bytes - 93d8599#diff-517b9bd1bbb5b31cf61cd970872617ff

Let me know your thoughts. Thanks.

@compnerd
Copy link
Member

Hmm, this technically changes the type, 32-bits to 64-bits. However, the TargetTupleTypeMetadata does store a StoredAddress for the NumElements. I think that the compiler enforced tuple element limit is preventing truncation, but, this seems generally correct. Thanks for fixing this!

@compnerd
Copy link
Member

@swift-ci please test

@jckarter
Copy link
Contributor

Yeah, this looks correct.

@rposts
Copy link
Contributor Author

rposts commented Jan 15, 2019

Thanks guys! Wonder if this can be merged in 5.0 branch or a separate PR is needed?

@jckarter
Copy link
Contributor

Yeah, please start another PR for the swift 5.0 branch. It would need to be approved by the release managers.

@jckarter jckarter merged commit 372834b into swiftlang:master Jan 15, 2019
@rposts rposts deleted the swift5.0-s390x-tupleSize-fix branch January 16, 2019 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants