jump was written off the end of binary code, fixed

This commit is contained in:
Torsten Ruger
2018-05-28 11:45:04 +03:00
parent 1c09d4202f
commit be1bc63ff2
10 changed files with 58 additions and 27 deletions

View File

@ -37,5 +37,13 @@ module Risc
def test_cpu_label
assert_equal Position::InstructionPosition , Position.get(@machine.cpu_init.first).class
end
def test_first_binary_jump
bin = Parfait.object_space.get_init.binary
assert 0 != bin.get_word(14) , "index 0 is 0 #{bin.inspect}"
end
def test_second_binary_first
bin = Parfait.object_space.get_init.binary.next
assert 0 != bin.get_word(0) , "index 0 is 0 #{bin.inspect}"
end
end
end

View File

@ -40,10 +40,6 @@ module Risc
word = Parfait::Word.new(12)
assert_equal 32 , word.padded_length
end
def test_pos_arm
mov = Arm::ArmMachine.mov :r1, 128
Risc::Position.set(0,0)
end
end
end