Class: YTLJit::OpImmidiate

Inherits:
Operand show all
Defined in:
lib/ytljit/instruction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Operand

#using

Constructor Details

#initialize(value) ⇒ OpImmidiate

Returns a new instance of OpImmidiate.



15
16
17
# File 'lib/ytljit/instruction.rb', line 15

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



23
24
25
# File 'lib/ytljit/instruction.rb', line 23

def value
  @value
end

Instance Method Details

#to_asObject



19
20
21
# File 'lib/ytljit/instruction.rb', line 19

def to_as
  "$0x#{value.to_s(16)}"
end