Class: Fisk::Registers::Register
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #extended_register? ⇒ Boolean
-
#initialize(name, type, value) ⇒ Register
constructor
A new instance of Register.
- #op_value ⇒ Object
- #works?(type) ⇒ Boolean
Methods inherited from Operand
#m64?, #register?, #rex_value, #temp_register?, #unknown_label?
Constructor Details
#initialize(name, type, value) ⇒ Register
Returns a new instance of Register.
42 43 44 45 46 |
# File 'lib/fisk.rb', line 42 def initialize name, type, value @name = name @type = type @value = value end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
40 41 42 |
# File 'lib/fisk.rb', line 40 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
40 41 42 |
# File 'lib/fisk.rb', line 40 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
40 41 42 |
# File 'lib/fisk.rb', line 40 def value @value end |
Instance Method Details
#extended_register? ⇒ Boolean
56 |
# File 'lib/fisk.rb', line 56 def extended_register?; @value > 7; end |
#op_value ⇒ Object
52 53 54 |
# File 'lib/fisk.rb', line 52 def op_value value & 0x7 end |
#works?(type) ⇒ Boolean
48 49 50 |
# File 'lib/fisk.rb', line 48 def works? type type == self.name || type == self.type end |