rename data_object to string_node and move the padding there

This commit is contained in:
Torsten Ruger
2014-04-23 00:12:43 +03:00
parent b240dc5100
commit 778890298c
7 changed files with 33 additions and 30 deletions

View File

@ -6,7 +6,7 @@ require 'asm/arm/generator_label'
require 'asm/nodes'
require 'stream_reader'
require 'stringio'
require "asm/data_object"
require "asm/string_node"
module Asm
module Arm

View File

@ -46,7 +46,7 @@ module Asm
def build_operand(arg , position = 0)
#position only needed for calculating relative addresses to data objects
#there is a design stink here which makes my head ache. But shanti shanti
if arg.is_a?(Asm::DataObject)
if arg.is_a?(Asm::StringNode)
# do pc relative addressing with the difference to the instuction
# 8 is for the funny pipeline adjustment (ie oc pointing to fetch and not execute)
arg = Asm::NumLiteralNode.new( arg.position - position - 8 )