Class: AArch64::Instructions::LDRSH_unsigned

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

Overview

LDRSH (immediate) – A64 Load Register Signed Halfword (immediate) LDRSH <Wt>, [<Xn|SP>#<pimm>] LDRSH <Xt>, [<Xn|SP>#<pimm>]

Instance Method Summary collapse

Constructor Details

#initialize(rt, rn, imm12, opc) ⇒ LDRSH_unsigned

Returns a new instance of LDRSH_unsigned.



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

def initialize rt, rn, imm12, opc
  @rt    = rt
  @rn    = rn
  @imm12 = imm12
  @opc   = opc
end

Instance Method Details

#encodeObject



15
16
17
# File 'lib/aarch64/instructions/ldrsh_unsigned.rb', line 15

def encode
  LDRSH_unsigned(@opc, @imm12, @rn.to_i, @rt.to_i)
end