fix instruction positioning

use at as at and only compute difference when needed (to determine if
there is a jump in binary)
Easier to understand that way
This commit is contained in:
Torsten Ruger
2018-05-11 18:36:45 +03:00
parent bc1e29e4f6
commit 776a97986d
14 changed files with 60 additions and 29 deletions

View File

@ -72,7 +72,7 @@ module Risc
def write_any( obj )
write_any_log( obj , "Write")
if @stream.length != Position.get(obj).at
puts "Write #{obj.class}:0x#{obj.object_id.to_s(16)} at 0x#{stream_position.to_s(16)} not #{Position.get(obj)}"
#puts "Write #{obj.class}:0x#{obj.object_id.to_s(16)} at 0x#{stream_position.to_s(16)} not #{Position.get(obj)}"
end
write_any_out(obj)
write_any_log( obj , "Wrote")