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.
135 136 137 138 139 140 141 |
# File 'lib/fisk.rb', line 135 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.
133 134 135 |
# File 'lib/fisk.rb', line 133 def end_point @end_point end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
132 133 134 |
# File 'lib/fisk.rb', line 132 def name @name end |
#register ⇒ Object
Returns the value of attribute register.
133 134 135 |
# File 'lib/fisk.rb', line 133 def register @register end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
132 133 134 |
# File 'lib/fisk.rb', line 132 def size @size end |
#start_point ⇒ Object
Returns the value of attribute start_point.
133 134 135 |
# File 'lib/fisk.rb', line 133 def start_point @start_point end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
132 133 134 |
# File 'lib/fisk.rb', line 132 def type @type end |
Instance Method Details
#extended_register? ⇒ Boolean
150 151 152 |
# File 'lib/fisk.rb', line 150 def extended_register? reg.extended_register? end |
#op_value ⇒ Object
146 147 148 |
# File 'lib/fisk.rb', line 146 def op_value reg.op_value end |
#reg ⇒ Object
166 167 168 169 170 171 172 |
# File 'lib/fisk.rb', line 166 def reg unless @register raise Errors::UnassignedRegister, "Temporary register #{name} hasn't been assigned a real register" end @register end |
#register? ⇒ Boolean
144 |
# File 'lib/fisk.rb', line 144 def register?; true; end |
#rex_value ⇒ Object
154 155 156 |
# File 'lib/fisk.rb', line 154 def rex_value reg.rex_value end |
#temp_register? ⇒ Boolean
143 |
# File 'lib/fisk.rb', line 143 def temp_register?; true; end |
#to_register ⇒ Object
162 163 164 |
# File 'lib/fisk.rb', line 162 def to_register self end |
#value ⇒ Object
158 159 160 |
# File 'lib/fisk.rb', line 158 def value reg.value end |