FastVM / Web49

Web49: WebAssembly Interpeter
MIT License
324 stars 15 forks source link

unknown opcodes print as decimal #6

Open ktye opened 1 year ago

ktye commented 1 year ago

memory.copy seems not to be implemented in the binary parser. however the error message is:

unknown opcode sequence: 0xFC 0x10

which should be 0xFC 0x0A. It looks like it's printed decimal in table.c (web49_bytes_to_opcode):

unknown opcode sequence: 0xFC 0x%" PRIu8

same for the other sequences.

ShawSumma commented 1 year ago

thank you for the bug report, i was just working on implementing the rest of 0xFC....

ShawSumma commented 1 year ago

I am doing a medium-sized refactor and this gets handled in there too. I'll close the issue when web49 can handle all 0xFC opcodes.

ktye commented 1 year ago

you still have swapped the opcodes for (memory.copy memory.fill data.drop) https://github.com/FastVM/Web49/blob/main/src/tables.c#L1456 it should be data.drop:0x09, memory.copy:0x0a, memory.fill:0x0b