[gamecode] Add tests for the hops instructions

And, of course, fix a bug in the inverted hops (yay for tests).
This commit is contained in:
Bill Currie 2022-01-16 18:46:29 +09:00
parent 7ea12b3ff9
commit d57712975e
3 changed files with 174 additions and 2 deletions

View file

@ -39,7 +39,7 @@ def dst_str(type, width, op):
return f"OPC({types[type][op]})"
def hop_str(type, width, op):
return f"OP_hop{width+1}"
return f"{'~' if op & 4 and op != 7 else ''}OP_hop{width+1}"
for type in range(2):
for width in range(1, 4): # 0 is reserved