mem_length to word/byte length

be more specific, and don’t include padding
This commit is contained in:
Torsten Ruger
2015-06-05 09:20:43 +03:00
parent 30d9aaf61b
commit 1c29fcfd43
13 changed files with 39 additions and 40 deletions

View File

@ -89,7 +89,7 @@ module Parfait
get_layout().index_of(name)
end
def mem_length
def word_length
padded_words( get_layout().get_length() + 2 )
end

View File

@ -128,8 +128,8 @@ module Parfait
raise "called"
class_for(MoveInstruction).new(value , self , :opcode => :mov)
end
def mem_length
padded(1 + string.length)
def word_length
(string.length+1) / 4
end
end
end