svenssonjoel / Sense-VM

Sense-VM has changed name to SynchronVM and is available in a new repository https://github.com/SynchronVM/SynchronVM
MIT License
5 stars 1 forks source link

Improving packing of the CALLRTS bytecode #12

Open Abhiroop opened 3 years ago

Abhiroop commented 3 years ago

The CALLRTS currently takes 2 bytes - 0x37FF. The second byte is used to encode up to 256 runtime operations. However, if we have a limited number of runtime functions we can use 7 bits to encode up to 128 runtime operations and set 1 bit for the bytecode itself packing the entire operation in 1 byte. Changes need to be made in the assembler.