Class: AArch64::Instructions::SUBG

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

Overview

SUBG – A64 Subtract with Tag SUBG <Xd|SP>, <Xn|SP>, #<uimm6>, #<uimm4>

Instance Method Summary collapse

Constructor Details

#initialize(xd, xn, uimm6, uimm4) ⇒ SUBG

Returns a new instance of SUBG.



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

def initialize xd, xn, uimm6, uimm4
  @xd    = check_mask(xd, 0x1f)
  @xn    = check_mask(xn, 0x1f)
  @uimm6 = check_mask(uimm6, 0x3f)
  @uimm4 = check_mask(uimm4, 0x0f)
end

Instance Method Details

#encode(_) ⇒ Object



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

def encode _
  SUBG(@uimm6, @uimm4, @xn, @xd)
end