Skip to content

WASM: Support bitwise operations #1456

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 3 commits into from
Jan 24, 2023
Merged

Conversation

ubaidsk
Copy link
Collaborator

@ubaidsk ubaidsk commented Jan 24, 2023

This PR adds support for bitwise operators in the wasm backend.

@ubaidsk ubaidsk added the wasm label Jan 24, 2023
@ubaidsk ubaidsk force-pushed the wasm_bitoperations branch from d982f88 to 725a580 Compare January 24, 2023 14:01
Comment on lines +967 to +968
// there is no direct bit-invert inst in wasm,
// so xor-ing with -1 (sequence of 32/64 1s)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ubaidsk
Copy link
Collaborator Author

ubaidsk commented Jan 24, 2023

For integration_tests, I am unsure if we should have all bit operations testing in a single file or if we should split testing in different files for each bitwise operator. I currently tested them all in same file and there are two files, one for 32-bit integers and other for 64-bit integers.

@ubaidsk
Copy link
Collaborator Author

ubaidsk commented Jan 24, 2023

This is ready. Please possibly review and share feedback.

@ubaidsk ubaidsk requested a review from certik January 24, 2023 14:06
@certik certik merged commit 2c5034a into lcompilers:main Jan 24, 2023
@ubaidsk ubaidsk deleted the wasm_bitoperations branch January 24, 2023 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants