This commit is contained in:
Torsten Ruger 2015-05-30 11:56:47 +03:00
parent bea10cc560
commit 33d464f032
2 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,7 @@ module Arm
operand = arg.position - self.position - 8 #stringtable is after code
add_offset = 1
if (operand.abs > 4095)
raise "reference offset too large/small (max 4095) #{arg} #{inspect}"
raise "reference offset too large/small (4095<#{operand}) #{arg} #{inspect}"
end
elsif( arg.is_a?(Numeric) )
#TODO untested brach, probably not working

View File

@ -6,6 +6,7 @@ module Arm
next unless code.is_a? Register::LoadConstant
load = ArmMachine.ldr( code.value , code.constant )
block.replace(code , load )
#puts "replaced #{load.inspect.to_s[0..1000]}"
end
end
end