just make sre we really ret registers (some constants were flying about)
This commit is contained in:
parent
e1b29d799a
commit
cae99f217c
@ -26,6 +26,11 @@ module Register
|
||||
raise "abstract called for #{self.class}"
|
||||
end
|
||||
|
||||
# wrap symbols into regsiter reference if needed
|
||||
def wrap_register reg
|
||||
return reg if reg.is_a? RegisterReference
|
||||
RegisterReference.new(reg)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -4,8 +4,8 @@ module Register
|
||||
|
||||
class RegisterTransfer < Instruction
|
||||
def initialize from , to
|
||||
@from = from
|
||||
@to = to
|
||||
@from = wrap_register(from)
|
||||
@to = wrap_register(to)
|
||||
end
|
||||
attr_reader :from, :to
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user