Add some threads opcodes

This commit is contained in:
2026-03-14 19:23:52 +00:00
parent 671e7f60d2
commit a3cfd405a9

8
asm.js
View File

@@ -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 = {