Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Fix bitrev intrinsic #683

Merged
merged 1 commit into from
Feb 23, 2019
Merged

Fix bitrev intrinsic #683

merged 1 commit into from
Feb 23, 2019

Conversation

robojumper
Copy link
Contributor

The incorrect version references a stackoverflow answer. The algorithm described there appears to be correct, but the transcription in cranelift contained one error where it would use a right-shift instead of a left-shift. I have fixed this error and the intrinsic now seems to work as intended.

Fixes #652.

@sunfishcode
Copy link
Member

Great spot!

@sunfishcode sunfishcode merged commit 0d180cf into bytecodealliance:master Feb 23, 2019
bjorn3 added a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Feb 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bitreverse intrinisic seems to work wrong
2 participants