Skip to content
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

Check for architectures that don't support unaligned reads? #24

Open
oberblastmeister opened this issue Aug 14, 2022 · 4 comments
Open

Comments

@oberblastmeister
Copy link

I think there are some unaligned reads here, and some architectures don't support them.

@AndrasKovacs
Copy link
Owner

AndrasKovacs commented Aug 14, 2022

Do you know perhaps how to check for architectures? I searched just now and didn't find out.

It makes sense to do it, but I'd consider it very low priority. Backends without unaligned access are extremely niche. Some searching turned up SPARC as the only such official backend.

@oberblastmeister
Copy link
Author

@AndrasKovacs
Copy link
Owner

Thanks!

@raehik
Copy link
Collaborator

raehik commented Mar 8, 2024

GHC 9.10 will be coming with (read|write)Word8OffAddrAs<ty> primops, which will handle unalignment on platforms that don't support it! (This isn't news to oberblastmeister because they wrote it! but I only just learned and it's gonna be super handy for some of my own code! thanks!!)

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

No branches or pull requests

3 participants