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

Implement Sign-extension operators #475

Closed
bbyalcinkaya opened this issue Apr 17, 2023 · 1 comment
Closed

Implement Sign-extension operators #475

bbyalcinkaya opened this issue Apr 17, 2023 · 1 comment

Comments

@bbyalcinkaya
Copy link
Member

Sign-extension operators proposal introduces new numeric instructions for sign-extending 8/16/32 bit integers. It has been standardized and implemented in major platforms. Rustc supports these instructions as of version 1.70.0-nightly.

New opcodes and instructions:

instr ::= ...
        | 0xC0                  =>  i32.extend8_s
        | 0xC1                  =>  i32.extend16_s
        | 0xC2                  =>  i64.extend8_s
        | 0xC3                  =>  i64.extend16_s
        | 0xC4                  =>  i64.extend32_s

Besides implementing the syntax and semantics in K, it requires switching to a more up-to-date Python Wasm binary parser library that supports these instructions. ethereum / py-wasm hasn't received any updates since 2019.

@bbyalcinkaya
Copy link
Member Author

#523

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

No branches or pull requests

1 participant