use factory functions consistently to create instructions

This commit is contained in:
Torsten Ruger
2016-12-28 19:01:58 +02:00
parent 4cf732d395
commit 9cf56b3aa6
13 changed files with 44 additions and 33 deletions

View File

@ -11,11 +11,11 @@ module Register
# Produce a RegToByte instruction.
# from and to are translated (from symbol to register if neccessary)
# but index is left as is.
# def self.reg_to_byte source , from , to , index
# from = resolve_to_register from
# index = resolve_to_index( to , index)
# to = resolve_to_register to
# RegToByte.new( source, from , to , index)
# end
def self.reg_to_byte( source , from , to , index)
from = resolve_to_register from
index = resolve_to_index( to , index)
to = resolve_to_register to
RegToByte.new( source, from , to , index)
end
end