GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — WASM, WASM_X64: Support shift operations by ubaidsk · Pull Request #1482 · lcompilers/lpython

Conversation

@ubaidsk

@ubaidsk ubaidsk commented Jan 31, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ubaidsk ubaidsk added the wasm label Jan 31, 2023
@ubaidsk
ubaidsk requested a review from certik January 31, 2023 16:54
@ubaidsk

ubaidsk commented Jan 31, 2023

Copy link
Copy Markdown
Collaborator Author

This is ready. Please possibly review and share feedback.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ubaidsk

ubaidsk commented Jan 31, 2023

Copy link
Copy Markdown
Collaborator Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

certik
certik approved these changes Jan 31, 2023
View reviewed changes
@certik certik mentioned this pull request Jan 31, 2023
WASM roadmap #1485
Open
13 of 23 tasks
@certik
certik force-pushed the wasm_shift_opts branch from 8c05a06 to cc0a7e0 Compare January 31, 2023 20:46
@certik

certik commented Jan 31, 2023

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

certik
certik approved these changes Jan 31, 2023
View reviewed changes
ubaidsk added 4 commits February 1, 2023 11:46
@ubaidsk
WASM: Support shift operations
6878528
BitRShift is currently signed/arithmetic right shift. This is similar to LLVM Backend.
@ubaidsk
TEST: Add/Update test for shift operations
cdf08dd
@ubaidsk
X86Assembler: Implement SHL and SAR Instructions
a045849
@ubaidsk
WASM_X64: Support I32Shl() and I32ShrS()
177a12d
@ubaidsk
ubaidsk force-pushed the wasm_shift_opts branch from cc0a7e0 to 177a12d Compare February 1, 2023 06:40
@ubaidsk ubaidsk changed the title WASM: Support shift operations WASM, WASM_X64: Support shift operations Feb 1, 2023
@ubaidsk

ubaidsk commented Feb 1, 2023

Copy link
Copy Markdown
Collaborator Author

The tests should hopefully pass now.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ubaidsk

ubaidsk commented Feb 1, 2023

Copy link
Copy Markdown
Collaborator Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

certik commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

Yes, this is good, thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@certik certik certik approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

wasm

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ubaidsk @certik
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.