From a3cfd405a9f1517fa471372cc81f1d30b1928675 Mon Sep 17 00:00:00 2001 From: Camden Dixie O'Brien Date: Sat, 14 Mar 2026 19:23:52 +0000 Subject: [PATCH] Add some threads opcodes --- asm.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/asm.js b/asm.js index 3668b19..2c277fb 100644 --- a/asm.js +++ b/asm.js @@ -167,6 +167,14 @@ const opcodes = { "i32.shl": 0x74, "i32.shr_s": 0x75, "i32.shr_u": 0x76, + + // Threads instructions + "memory.atomic.notify": [ 0xfe, 0x00 ], + "memory.atomic.wait32": [ 0xfe, 0x01 ], + "memory.atomic.load": [ 0xfe, 0x10 ], + "memory.atomic.load8_u": [ 0xfe, 0x12 ], + "memory.atomic.store": [ 0xfe, 0x17 ], + "memory.atomic.store8": [ 0xfe, 0x19 ], }; const mem_flags = {