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.



1070
1071
1072
# File 'lib/wilson.rb', line 1070

def id
  @id
end

Class Method Details

.on_id(machine, id) ⇒ Object



1072
1073
1074
1075
1076
1077
# File 'lib/wilson.rb', line 1072

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)


1079
1080
1081
# File 'lib/wilson.rb', line 1079

def special_register?
  true
end