Class: AArch64::Parser::RegsWithShift

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of RegsWithShift.



13
14
15
16
17
18
19
# File 'lib/aarch64/parser.rb', line 13

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

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



11
12
13
# File 'lib/aarch64/parser.rb', line 11

def amount
  @amount
end

#dObject (readonly)

Returns the value of attribute d.



11
12
13
# File 'lib/aarch64/parser.rb', line 11

def d
  @d
end

#mObject (readonly)

Returns the value of attribute m.



11
12
13
# File 'lib/aarch64/parser.rb', line 11

def m
  @m
end

#nObject (readonly)

Returns the value of attribute n.



11
12
13
# File 'lib/aarch64/parser.rb', line 11

def n
  @n
end

#shiftObject (readonly)

Returns the value of attribute shift.



11
12
13
# File 'lib/aarch64/parser.rb', line 11

def shift
  @shift
end

Instance Method Details

#apply(asm, name) ⇒ Object



21
22
23
# File 'lib/aarch64/parser.rb', line 21

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