Class: AArch64::Instructions::ADDS_addsub_shift

Inherits:
Instruction
  • Object
show all
Defined in:
lib/aarch64/instructions/adds_addsub_shift.rb

Overview

ADDS (shifted register) – A64 Add (shifted register), setting flags ADDS <Wd>, <Wn>, <Wm><shift> #<amount> ADDS <Xd>, <Xn>, <Xm><shift> #<amount>

Instance Method Summary collapse

Constructor Details

#initialize(xd, xn, xm, shift, amount, sf) ⇒ ADDS_addsub_shift

Returns a new instance of ADDS_addsub_shift.



8
9
10
11
12
13
14
15
# File 'lib/aarch64/instructions/adds_addsub_shift.rb', line 8

def initialize xd, xn, xm, shift, amount, sf
  @xd     = check_mask(xd, 0x1f)
  @xn     = check_mask(xn, 0x1f)
  @xm     = check_mask(xm, 0x1f)
  @shift  = check_mask(shift, 0x03)
  @amount = check_mask(amount, 0x3f)
  @sf     = check_mask(sf, 0x01)
end

Instance Method Details

#encode(_) ⇒ Object



17
18
19
# File 'lib/aarch64/instructions/adds_addsub_shift.rb', line 17

def encode _
  ADDS_addsub_shift(@sf, @shift, @xm, @amount, @xn, @xd)
end