minor
This commit is contained in:
parent
bea10cc560
commit
33d464f032
@ -51,7 +51,7 @@ module Arm
|
|||||||
operand = arg.position - self.position - 8 #stringtable is after code
|
operand = arg.position - self.position - 8 #stringtable is after code
|
||||||
add_offset = 1
|
add_offset = 1
|
||||||
if (operand.abs > 4095)
|
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
|
end
|
||||||
elsif( arg.is_a?(Numeric) )
|
elsif( arg.is_a?(Numeric) )
|
||||||
#TODO untested brach, probably not working
|
#TODO untested brach, probably not working
|
||||||
|
@ -6,6 +6,7 @@ module Arm
|
|||||||
next unless code.is_a? Register::LoadConstant
|
next unless code.is_a? Register::LoadConstant
|
||||||
load = ArmMachine.ldr( code.value , code.constant )
|
load = ArmMachine.ldr( code.value , code.constant )
|
||||||
block.replace(code , load )
|
block.replace(code , load )
|
||||||
|
#puts "replaced #{load.inspect.to_s[0..1000]}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user