fixing assembly

position code changed and linking too
passes not working
This commit is contained in:
Torsten Ruger
2015-05-24 18:05:20 +03:00
parent 95ac024421
commit 2ccbea04b9
15 changed files with 111 additions and 182 deletions

View File

@ -140,9 +140,15 @@ module Virtual
l = @blocks.inject(0) { |c , block| c += block.mem_length }
padded(l)
end
def padded len
a = 32 * (1 + (len + 7)/32 )
#puts "#{a} for #{len}"
a
end
# position of the function is the position of the entry block, is where we call
def set_position at
super
at += 8 #for the 2 header words
@blocks.each do |block|
block.set_position at