Class: AArch64::Parser::RegRegShift

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(d, m, shift: :lsl, amount: 0) ⇒ RegRegShift

Returns a new instance of RegRegShift.



29
30
31
32
33
34
# File 'lib/aarch64/parser.rb', line 29

def initialize d, m, shift: :lsl, amount: 0
  @d      = d
  @m      = m
  @shift  = shift
  @amount = amount
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



27
28
29
# File 'lib/aarch64/parser.rb', line 27

def amount
  @amount
end

#dObject (readonly)

Returns the value of attribute d.



27
28
29
# File 'lib/aarch64/parser.rb', line 27

def d
  @d
end

#mObject (readonly)

Returns the value of attribute m.



27
28
29
# File 'lib/aarch64/parser.rb', line 27

def m
  @m
end

#shiftObject (readonly)

Returns the value of attribute shift.



27
28
29
# File 'lib/aarch64/parser.rb', line 27

def shift
  @shift
end

Instance Method Details

#apply(asm, name) ⇒ Object



36
37
38
# File 'lib/aarch64/parser.rb', line 36

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