fix init jump bug

the label for the jump was not translated correctly
call needs to go through to_cpu to create single instance
on the way init order slightly changed
This commit is contained in:
Torsten Ruger
2018-05-01 19:19:04 +03:00
parent 3b6ff3d94f
commit dd2c2cb975
4 changed files with 16 additions and 10 deletions

View File

@@ -50,7 +50,7 @@ module Parfait
end
def translate_cpu(translator)
@cpu_instructions = translator.translate(@risc_instructions)
@cpu_instructions = @risc_instructions.to_cpu(translator)
nekst = @risc_instructions.next
while(nekst)
cpu = nekst.to_cpu(translator) # returning nil means no replace