fix interpreter to use positions

tick from one (simulated memory) position to the next
(not from one instruction to the next)
This commit is contained in:
Torsten Ruger
2018-05-17 20:14:59 +03:00
parent 8966a50a8a
commit 15e4533a2f
3 changed files with 85 additions and 14 deletions

View File

@ -30,7 +30,10 @@ module Risc
end
class IdentityTranslator
def translate(code)
return Label.new( code.source , code.name ) if code.is_a?(Label)
#return Label.new( code.source , code.name ) if code.is_a?(Label)
if( code.is_a?(Branch))
return code.class.new(code.source , code.label.to_cpu(self))
end
ret = code.dup
ret.nil_next
ret