Class: AArch64::Instructions::LDTRSH

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

Overview

LDTRSH – A64 Load Register Signed Halfword (unprivileged) LDTRSH <Wt>, [<Xn|SP>#<simm>] LDTRSH <Xt>, [<Xn|SP>#<simm>]

Instance Method Summary collapse

Constructor Details

#initialize(rt, rn, imm9, opc) ⇒ LDTRSH

Returns a new instance of LDTRSH.



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

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

Instance Method Details

#encode(_) ⇒ Object



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

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