Skip to content

WASM, WASM_X64: Support shift operations - #1482

Merged
ubaidsk merged 4 commits into
lcompilers:mainfrom
ubaidsk:wasm_shift_opts
Feb 1, 2023
Merged

WASM, WASM_X64: Support shift operations#1482
ubaidsk merged 4 commits into
lcompilers:mainfrom
ubaidsk:wasm_shift_opts

Conversation

@ubaidsk

@ubaidskubaidsk commented Jan 31, 2023

Copy link
Copy Markdown
Collaborator

This PR adds support of left shift and right shift operations in the wasm and wasm_x64 backends. For right shift, I currently used signed/arithmetic right shift operation (this seems similar to the llvm backend). Other possibility is using unsigned/logical right shift operation.

@ubaidsk
ubaidsk requested a review from certikJanuary 31, 2023 16:54
@ubaidsk

Copy link
Copy Markdown
CollaboratorAuthor

This is ready. Please possibly review and share feedback.

@ubaidsk

Copy link
Copy Markdown
CollaboratorAuthor

This PR might fail after merging of #1481. As the test integration_tests/bit_operations_i32.py was enabled for the wasm_x64 backend in the commit TEST: Enable suporting tests and the wasm_x64 backend currently does not have support for shift operations.

@certikcertik mentioned this pull request Jan 31, 2023
23 tasks
@certik

Copy link
Copy Markdown
Contributor

All tests passed and I now rebased on top of the latest master.

@ubaidskubaidsk changed the title WASM: Support shift operationsWASM, WASM_X64: Support shift operationsFeb 1, 2023
@ubaidsk

Copy link
Copy Markdown
CollaboratorAuthor

The tests should hopefully pass now.

The new commits X86Assembler: Implement SHL and SAR Instructions and
WASM_X64: Support I32Shl() and I32ShrS() need review.

@ubaidsk

Copy link
Copy Markdown
CollaboratorAuthor

I am adding this to auto-merge as it seems approved. I will support changes/updates suggested (if any) for recently added commits in a new PR.

@ubaidsk
ubaidsk enabled auto-merge February 1, 2023 06:47
@ubaidsk
ubaidsk merged commit 9417d7e into lcompilers:mainFeb 1, 2023
@ubaidsk
ubaidsk deleted the wasm_shift_opts branch February 1, 2023 07:44
@certik

Copy link
Copy Markdown
Contributor

Yes, this is good, thanks!

Sign up for freeto 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

@ubaidsk@certik