Class: AArch64::Parser::TwoWithShift

Inherits:
Object
  • Object
show all
Defined in:
lib/aarch64/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(n, m, shift:, amount:) ⇒ TwoWithShift

Returns a new instance of TwoWithShift.



59
60
61
62
63
64
# File 'lib/aarch64/parser.rb', line 59

def initialize n, m, shift:, amount:
  @n      = n
  @m      = m
  @shift  = shift
  @amount = amount
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



57
58
59
# File 'lib/aarch64/parser.rb', line 57

def amount
  @amount
end

#mObject (readonly)

Returns the value of attribute m.



57
58
59
# File 'lib/aarch64/parser.rb', line 57

def m
  @m
end

#nObject (readonly)

Returns the value of attribute n.



57
58
59
# File 'lib/aarch64/parser.rb', line 57

def n
  @n
end

#shiftObject (readonly)

Returns the value of attribute shift.



57
58
59
# File 'lib/aarch64/parser.rb', line 57

def shift
  @shift
end

Instance Method Details

#apply(asm, name) ⇒ Object



66
67
68
# File 'lib/aarch64/parser.rb', line 66

def apply asm, name
  asm.public_send(name, n, m, shift: shift, amount: amount)
end