Skip to content

Instantly share code, notes, and snippets.

@gillesdemey
Last active July 31, 2021 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gillesdemey/798bc73255fde0c8c6a096a1a1730e94 to your computer and use it in GitHub Desktop.
Save gillesdemey/798bc73255fde0c8c6a096a1a1730e94 to your computer and use it in GitHub Desktop.
asm`addsubtractmemory
 j   k @nameaddsubtractp0p1p0p1t0 memory
(module
(type $t0 (func (param i32 i32) (result i32)))
(func $add (export "add") (type $t0) (param $p0 i32) (param $p1 i32) (result i32)
get_local $p0
get_local $p1
i32.add)
(func $subtract (export "subtract") (type $t0) (param $p0 i32) (param $p1 i32) (result i32)
get_local $p1
get_local $p0
i32.sub)
(memory $memory (export "memory") 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment