From 33d464f032f714fc46b74f95e03e37fcf629ff23 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sat, 30 May 2015 11:56:47 +0300 Subject: [PATCH] minor --- lib/arm/instructions/memory_instruction.rb | 2 +- lib/arm/passes/constant_implementation.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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