remove Risc.resolve_to_index
mostly by using better typed registers, which cleans up the code where it was used
This commit is contained in:
@ -12,9 +12,8 @@ module Risc
|
||||
# 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
|
||||
raise "Not register #{to}" unless RegisterValue.look_like_reg(to)
|
||||
index = to.resolve_index(index) if index.is_a?(Symbol)
|
||||
RegToByte.new( source, from , to , index)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user