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

Safe unaligned access without #ifdefs #1301

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

taruti
Copy link
Contributor

@taruti taruti commented Mar 10, 2019

  • Cleaner code
  • Avoids #ifdefs for ARM (and ARM64 etc)
  • Optimizes cleanly with modern compilers
  • Less prone to errors
  • I'm open to bikeshedding the function names, the idea is that they use native endianess thus decode/encode_native.
  • This code has templates, but IMHO keeps them very simple, so it does not add cognitive overhead.

This is ok to postpone for NEXT (as long as ARM64 support is not needed).

@nohal
Copy link
Collaborator

nohal commented Mar 10, 2019

Let's see, we can postpone it at any later moment...

@bdbcat
Copy link
Member

bdbcat commented Mar 12, 2019

Nice code...
Deferred until after O5 release.

@did-g
Copy link
Contributor

did-g commented Mar 15, 2019

Hi,
Is 32 bits stuff still relevant? There's more 'ifdef' unprotected unaligned 32 bits accesses in OpenCPN, nonetheless it's working on ARM.

@leamas
Copy link
Collaborator

leamas commented Apr 29, 2021

Hi,

long time, no see... Personally, I think it's a pity that this code isn't merged. Have you motivation and time to rebase it?

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

Successfully merging this pull request may close these issues.

None yet

5 participants