diff --git a/lib/arm/instructions/memory_instruction.rb b/lib/arm/instructions/memory_instruction.rb index 2362141c..11507c95 100644 --- a/lib/arm/instructions/memory_instruction.rb +++ b/lib/arm/instructions/memory_instruction.rb @@ -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 diff --git a/lib/arm/passes/constant_implementation.rb b/lib/arm/passes/constant_implementation.rb index 4cee17f8..42aacdf8 100644 --- a/lib/arm/passes/constant_implementation.rb +++ b/lib/arm/passes/constant_implementation.rb @@ -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