fix the logic of move, but really there is a deeper issue (we'd have to add to get pc relative addressing for constants)

This commit is contained in:
Torsten Ruger 2014-10-02 16:08:24 +03:00
parent 0e3e11a699
commit cc08016a0f

View File

@ -38,13 +38,9 @@ module Arm
# do pc relative addressing with the difference to the instuction
# 8 is for the funny pipeline adjustment (ie pc pointing to fetch and not execute)
right = Virtual::IntegerConstant.new( r_pos - self.position - 8 )
#puts "Position #{r_pos} from #{self.position} = #{right}"
if right.integer > 255
right = Virtual::IntegerConstant.new(r_pos)
else
puts "Position #{r_pos} from #{self.position} = #{right}"
rn = :pc
end
end
if (right.is_a?(Virtual::IntegerConstant))
if (right.fits_u8?)
# no shifting needed