From cc08016a0ff291edfadd69a826624794bb58ecc9 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 2 Oct 2014 16:08:24 +0300 Subject: [PATCH] fix the logic of move, but really there is a deeper issue (we'd have to add to get pc relative addressing for constants) --- lib/arm/move_instruction.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/arm/move_instruction.rb b/lib/arm/move_instruction.rb index 33b30d01..ef7eb47d 100644 --- a/lib/arm/move_instruction.rb +++ b/lib/arm/move_instruction.rb @@ -38,12 +38,8 @@ 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 - rn = :pc - end + puts "Position #{r_pos} from #{self.position} = #{right}" + rn = :pc end if (right.is_a?(Virtual::IntegerConstant)) if (right.fits_u8?)