Class: Fisk::Instruction
Instance Method Summary
collapse
#comment?, #jump?, #label?, #lazy?, #retry?
Constructor Details
#initialize(insn, form, operands) ⇒ Instruction
Returns a new instance of Instruction.
375
376
377
378
379
|
# File 'lib/fisk.rb', line 375
def initialize insn, form, operands
@insn = insn
@form = form
@operands = operands
end
|
Instance Method Details
#encode(buffer, labels) ⇒ Object
393
394
395
396
|
# File 'lib/fisk.rb', line 393
def encode buffer, labels
encoding = @form.encodings.first
encoding.encode buffer, @operands
end
|
#encodings ⇒ Object
389
390
391
|
# File 'lib/fisk.rb', line 389
def encodings
@form.encodings
end
|
#has_temp_registers? ⇒ Boolean
381
382
383
|
# File 'lib/fisk.rb', line 381
def has_temp_registers?
@operands.any?(&:temp_register?)
end
|
#temp_registers ⇒ Object
385
386
387
|
# File 'lib/fisk.rb', line 385
def temp_registers
@operands.find_all(&:temp_register?)
end
|