Skip to content

wasm256 - Wasm with native i256 #193

@axic

Description

@axic

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions