giving the register_value it's value
though not used yet
This commit is contained in:
parent
5122137a33
commit
82d6ebf392
@ -4,14 +4,15 @@ module Register
|
|||||||
|
|
||||||
class RegisterValue
|
class RegisterValue
|
||||||
|
|
||||||
attr_accessor :symbol , :type
|
attr_accessor :symbol , :type , :value
|
||||||
|
|
||||||
def initialize r , type
|
def initialize r , type , value = nil
|
||||||
raise "wrong type for register init #{r}" unless r.is_a? Symbol
|
raise "wrong type for register init #{r}" unless r.is_a? Symbol
|
||||||
raise "double r #{r}" if r.to_s[0,1] == "rr"
|
raise "double r #{r}" if r.to_s[0,1] == "rr"
|
||||||
raise "not reg #{r}" unless self.class.look_like_reg r
|
raise "not reg #{r}" unless self.class.look_like_reg r
|
||||||
@type = Phisol::Type.from_sym type
|
@type = Phisol::Type.from_sym type
|
||||||
@symbol = r
|
@symbol = r
|
||||||
|
@value = value
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user