Add a bunch of opcodes

This commit is contained in:
2026-03-14 19:17:28 +00:00
parent 580d5d2a4a
commit 671e7f60d2

25
asm.js
View File

@@ -134,14 +134,39 @@ const opcodes = {
"end": 0x0b, "end": 0x0b,
"br": 0x0c, "br": 0x0c,
"br_if": 0x0d, "br_if": 0x0d,
"call": 0x10,
"call_indirect": 0x11,
"drop": 0x0a,
"local.get": 0x20, "local.get": 0x20,
"local.set": 0x21, "local.set": 0x21,
"local.tee": 0x22, "local.tee": 0x22,
"global.get": 0x23, "global.get": 0x23,
"global.set": 0x24, "global.set": 0x24,
"i32.load": 0x28,
"i32.load8_u": 0x2d,
"i32.store": 0x36,
"i32.store8": 0x3a,
"i32.const": 0x41, "i32.const": 0x41,
"i32.eqz": 0x45,
"i32.eq": 0x46,
"i32.ne": 0x47,
"i32.lt_s": 0x48,
"i32.lt_u": 0x49,
"i32.gt_s": 0x4a,
"i32.gt_u": 0x4b, "i32.gt_u": 0x4b,
"i32.le_s": 0x4c,
"i32.le_u": 0x4d,
"i32.ge_s": 0x4e,
"i32.ge_u": 0x4f,
"i32.add": 0x6a,
"i32.sub": 0x6b,
"i32.mul": 0x6c, "i32.mul": 0x6c,
"i32.and": 0x71,
"i32.or": 0x72,
"i32.xor": 0x73,
"i32.shl": 0x74,
"i32.shr_s": 0x75,
"i32.shr_u": 0x76,
}; };
const mem_flags = { const mem_flags = {