Class: AArch64::Instructions::LDRSH_unsigned

Inherits:
Instruction
  • 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    = check_mask(rt, 0x1f)
  @rn    = check_mask(rn, 0x1f)
  @imm12 = check_mask(imm12, 0xfff)
  @opc   = check_mask(opc, 0x03)
end

Instance Method Details

#encode(_) ⇒ Object



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

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