Class: Wilson::SpecialRegister

Inherits:
Operand show all
Defined in:
lib/wilson.rb

Overview

SpecialRegister is the abstract implementation of any kind of register that isn’t a general register, eg: segment registers, mmx registers, fpu registers, etc…

Instance Attribute Summary collapse

Attributes inherited from Operand

#bits, #machine

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Operand

#initialize, #instructionFromMessage, #method_missing, on, #operand?

Constructor Details

This class inherits a constructor from Wilson::Operand

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Wilson::Operand

Instance Attribute Details

#idObject

Returns the value of attribute id.



1127
1128
1129
# File 'lib/wilson.rb', line 1127

def id
  @id
end

Class Method Details

.on_id(machine, id) ⇒ Object



1129
1130
1131
1132
1133
1134
# File 'lib/wilson.rb', line 1129

def self.on_id machine, id
  register = self.new
  register.machine = machine
  register.id = id
  register
end

Instance Method Details

#special_register?Boolean

Returns:

  • (Boolean)


1136
1137
1138
# File 'lib/wilson.rb', line 1136

def special_register?
  true
end