Skip to content

[SE-0349] Implementation for unaligned loads from raw memory #41033

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
merged 11 commits into from
Apr 18, 2022

Conversation

glessard
Copy link
Contributor

@glessard glessard commented Jan 27, 2022

Implementation for SE-0349, adding unaligned load API to UnsafeRawPointer and related types.

The proposal acceptance is here.

Resolves SR-10273 (rdar://63919502), and rdar://91705753

@glessard glessard force-pushed the se-unaligned branch 3 times, most recently from a9dffcb to 46d88d6 Compare February 1, 2022 22:12
@glessard glessard force-pushed the se-unaligned branch 2 times, most recently from 8f4883c to 04206bc Compare February 10, 2022 21:52
@glessard
Copy link
Contributor Author

@swift-ci please smoke test

- preserve previous version for ABI and source stability.
- add new version without alignment restriction.
- add explicit POD type enforcement in new version.
- preserve previous version for ABI and source stability.
- add new version without alignment restriction.
- add explicit POD type enforcement in new version.
@glessard
Copy link
Contributor Author

(rebased to incorporate #42318)

@glessard
Copy link
Contributor Author

@swift-ci please test

@glessard glessard marked this pull request as ready for review April 15, 2022 22:42
@glessard glessard changed the title [DNM] SE pitch: Unaligned loads from raw memory [SE-0349] Implementation for unaligned loads from raw memory Apr 15, 2022
@glessard
Copy link
Contributor Author

@swift-ci please test macOS platform

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good. Thanks!

Q: Do we need to add new tests for unaligned storeBytes?

@glessard
Copy link
Contributor Author

I'll add the valid unaligned one; I started writing that, but it turned into a test for an invalid store…

@glessard
Copy link
Contributor Author

@swift-ci please test and merge

@glessard
Copy link
Contributor Author

@swift-ci please test and merge

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.

4 participants