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

Add support for sign extension instructions. #58

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

jmillikin
Copy link
Contributor

Proposal https://github.com/WebAssembly/sign-extension-ops added the following instructions for sign-extending integers:

0xC0 i32.extend8_s
0xC1 i32.extend16_s
0xC2 i64.extend8_s
0xC3 i64.extend16_s
0xC4 i64.extend32_s

These instructions are now in widespread use, including in WASM generated by LLVM (e.g. when compiling Rust).

Proposal https://github.com/WebAssembly/sign-extension-ops added
the following instructions for sign-extending integers:

    0xC0 i32.extend8_s
    0xC1 i32.extend16_s
    0xC2 i64.extend8_s
    0xC3 i64.extend16_s
    0xC4 i64.extend32_s

These instructions are now in widespread use, including in WASM
generated by LLVM (e.g. when compiling Rust).
Copy link
Owner

@rhysd rhysd left a comment

Choose a reason for hiding this comment

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

Can you add parsing text format of the instructions to wain-syntax-text crate?

@jmillikin
Copy link
Contributor Author

Can you add parsing text format of the instructions to wain-syntax-text crate?

Done.

Copy link
Owner

@rhysd rhysd left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you for this patch.

@rhysd
Copy link
Owner

rhysd commented Nov 18, 2023

I'll fix clippy warnings locally.

@rhysd rhysd merged commit dcd691b into rhysd:master Nov 18, 2023
8 of 9 checks passed
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.

2 participants