Class: AArch64::Instructions::LDRSH_imm

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

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(rt, rn, imm9, option, opc) ⇒ LDRSH_imm

Returns a new instance of LDRSH_imm.



12
13
14
15
16
17
18
# File 'lib/aarch64/instructions/ldrsh_imm.rb', line 12

def initialize rt, rn, imm9, option, opc
  @rt     = check_mask(rt, 0x1f)
  @rn     = check_mask(rn, 0x1f)
  @imm9   = check_mask(imm9, 0x1ff)
  @option = check_mask(option, 0x03)
  @opc    = check_mask(opc, 0x03)
end

Instance Method Details

#encode(_) ⇒ Object



20
21
22
# File 'lib/aarch64/instructions/ldrsh_imm.rb', line 20

def encode _
  LDRSH_imm(@opc, @imm9, @option, @rn, @rt)
end