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

fix bswap for odd number of bytes #41

Merged
merged 1 commit into from
Oct 5, 2023
Merged

fix bswap for odd number of bytes #41

merged 1 commit into from
Oct 5, 2023

Conversation

rfourquet
Copy link
Owner

Fixes #38.

bswap was seeming to work well since Julia v1.6, but LLVM documents that bswap is valid only for an even number of bytes
(https://llvm.org/docs/LangRef.html#llvm-bswap-intrinsics), and a julia build with LLVM asserts enabled catches that.

NB: to enable LLVM asserts, put the following in "Make.user" :

FORCE_ASSERTIONS=1
LLVM_ASSERTIONS=1

Fixes #38.

`bswap` was seeming to work well since Julia v1.6, but LLVM documents that
`bswap` is valid only for an even number of bytes
(https://llvm.org/docs/LangRef.html#llvm-bswap-intrinsics),
and a julia build with LLVM asserts enabled catches that.

NB: to enable LLVM asserts, put the following in "Make.user" :
```
FORCE_ASSERTIONS=1
LLVM_ASSERTIONS=1
```
@rfourquet rfourquet merged commit deb17db into master Oct 5, 2023
@rfourquet rfourquet deleted the dev branch October 5, 2023 12:56
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.

bswap requires even number of bytes
1 participant