RoyalIcing / Orb

Write WebAssembly with Elixir
https://useorb.dev
BSD 3-Clause "New" or "Revised" License
215 stars 4 forks source link

Add bulk memory operations #40

Open RoyalIcing opened 4 months ago

RoyalIcing commented 4 months ago

https://github.com/WebAssembly/bulk-memory-operations/blob/master/proposals/bulk-memory-operations/Overview.md

LLM generated summary:

The Bulk Memory Operations proposal includes:

• memory.init: Initializes a range of memory with data from a data segment. • data.drop: Drops a data segment so it can no longer be used. • memory.copy: Copies data from one region of memory to another. • memory.fill: Fills a region of memory with a specified byte value.

Bulk Memory Operations Instructions

  1. memory.init • Used to initialize a memory region with data from a data segment. • Signature: memory.init . • Example: memory.init 0 0.
  2. data.drop • Marks a data segment as no longer needed. • Signature: data.drop . • Example: data.drop 0.
  3. memory.copy • Copies data from one memory region to another. • Signature: memory.copy . • Example: memory.copy 10 0 5.
  4. memory.fill • Fills a memory region with a specified byte value. • Signature: memory.fill . • Example: memory.fill 0 255 10.