Class: AArch64::Instructions::ADDG

Inherits:
Instruction show all
Defined in:
lib/aarch64/instructions/addg.rb

Overview

ADDG – A64 Add with Tag ADDG <Xd|SP>, <Xn|SP>, #<uimm6>, #<uimm4>

Instance Method Summary collapse

Constructor Details

#initialize(xd, xn, imm6, imm4) ⇒ ADDG

Returns a new instance of ADDG.



7
8
9
10
11
12
# File 'lib/aarch64/instructions/addg.rb', line 7

def initialize xd, xn, imm6, imm4
  @xd   = check_mask(xd, 0x1f)
  @xn   = check_mask(xn, 0x1f)
  @imm6 = check_mask(imm6, 0x3f)
  @imm4 = check_mask(imm4, 0x0f)
end

Instance Method Details

#encode(_) ⇒ Object



14
15
16
# File 'lib/aarch64/instructions/addg.rb', line 14

def encode _
  ADDG(@imm6, @imm4, @xn, @xd)
end