Class: Fisk::Registers::Temp
- Includes:
- OperandSize
- Defined in:
- lib/fisk.rb
Instance Attribute Summary collapse
-
#end_point ⇒ Object
Returns the value of attribute end_point.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#register ⇒ Object
Returns the value of attribute register.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#start_point ⇒ Object
Returns the value of attribute start_point.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #extended_register? ⇒ Boolean
-
#initialize(name, type) ⇒ Temp
constructor
A new instance of Temp.
- #op_value ⇒ Object
- #reg ⇒ Object
- #register? ⇒ Boolean
- #rex_value ⇒ Object
- #temp_register? ⇒ Boolean
- #to_register ⇒ Object
- #value ⇒ Object
Methods included from OperandSize
Methods inherited from Operand
Methods included from OperandPredicates
#absolute_location?, #immediate?, #memory?, #rip?, #unresolved?
Constructor Details
#initialize(name, type) ⇒ Temp
Returns a new instance of Temp.
131 132 133 134 135 136 137 |
# File 'lib/fisk.rb', line 131 def initialize name, type @name = name @type = type @start_point = nil @end_point = nil @size = compute_size(type) end |
Instance Attribute Details
#end_point ⇒ Object
Returns the value of attribute end_point.
129 130 131 |
# File 'lib/fisk.rb', line 129 def end_point @end_point end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
128 129 130 |
# File 'lib/fisk.rb', line 128 def name @name end |
#register ⇒ Object
Returns the value of attribute register.
129 130 131 |
# File 'lib/fisk.rb', line 129 def register @register end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
128 129 130 |
# File 'lib/fisk.rb', line 128 def size @size end |
#start_point ⇒ Object
Returns the value of attribute start_point.
129 130 131 |
# File 'lib/fisk.rb', line 129 def start_point @start_point end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
128 129 130 |
# File 'lib/fisk.rb', line 128 def type @type end |
Instance Method Details
#extended_register? ⇒ Boolean
146 147 148 |
# File 'lib/fisk.rb', line 146 def extended_register? reg.extended_register? end |
#op_value ⇒ Object
142 143 144 |
# File 'lib/fisk.rb', line 142 def op_value reg.op_value end |
#reg ⇒ Object
162 163 164 165 166 167 168 |
# File 'lib/fisk.rb', line 162 def reg unless @register raise Errors::UnassignedRegister, "Temporary register #{name} hasn't been assigned a real register" end @register end |
#register? ⇒ Boolean
140 |
# File 'lib/fisk.rb', line 140 def register?; true; end |
#rex_value ⇒ Object
150 151 152 |
# File 'lib/fisk.rb', line 150 def rex_value reg.rex_value end |
#temp_register? ⇒ Boolean
139 |
# File 'lib/fisk.rb', line 139 def temp_register?; true; end |
#to_register ⇒ Object
158 159 160 |
# File 'lib/fisk.rb', line 158 def to_register self end |
#value ⇒ Object
154 155 156 |
# File 'lib/fisk.rb', line 154 def value reg.value end |