rrthomas / mit

A simple stack-based VM
Other
10 stars 3 forks source link

Suggested instruction encoding tweak #368

Closed apt1002 closed 4 years ago

apt1002 commented 4 years ago
xxxxx000 - instruction
xxxxx100 - pushi with a positive operand
xxxxxx10 - pushreli with a positive offset
xxxxxx01 - pushreli with a negative offset
xxxxx011 - pushi with a negative operand
xxxxx111 - instruction

What this gains over the current scheme is that there is no special case for pushreli_M1.