fix label loading in arm

was still loading the integer address
instead of the return address's address
Hello World working
This commit is contained in:
Torsten Ruger
2018-06-19 17:35:00 +03:00
parent 956c2ebe54
commit db459fcd3d
4 changed files with 6 additions and 3 deletions

View File

@ -91,6 +91,7 @@ module Arm
if( @left.is_a?(Parfait::Object) or @left.is_a?(Risc::Label) or
(@left.is_a?(Symbol) and !Risc::RiscValue.look_like_reg(@left)))
left = @left
left = left.address if left.is_a?(Risc::Label)
# do pc relative addressing with the difference to the instuction
# 8 is for the funny pipeline adjustment (ie pointing to fetch and not execute)
right = Risc::Position.get(left) - 8