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

wasm256 - Wasm with native i256 #193

Open
axic opened this issue May 11, 2019 · 1 comment
Open

wasm256 - Wasm with native i256 #193

axic opened this issue May 11, 2019 · 1 comment

Comments

@axic
Copy link
Member

axic commented May 11, 2019

Depending on the speed of #189 we may want to consider augmenting Wasm with 256-bit support. This issue track the extreme end where native 256-bit opcodes are added.

These native opcodes could operate on memory or on stack.

Operating on memory

Only instructions would need to be introduced, such as i256.add, taking memory pointers.
The drawback here is the overhead of accessing the memory.

Operating on stack

In this case load/store operations to move between stack and memory as well as operations on the stack items would be needed. Such as i256.load, i256.store and i256.add, etc.

The drawback here is that the entire stack would need to be 256-bit wide increasing the runtime memory usage and potentially the complexity.

Bringing in memory as stack

This would mean a special opcode maps a memory region as stack ("stack pointer"), similar to how x86 works.

Such as i256.setstack <memoryOffset>.


TBD

@jakelang
Copy link
Member

Meh. I think we should focus fully on the bignum library. Augmenting the WASM spec has a lot of implications and resource requirements that we can't fulfill.

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

No branches or pull requests

2 participants