Class: AArch64::Instructions::LDRSH_reg

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

Overview

LDRSH (register) – A64 Load Register Signed Halfword (register) LDRSH <Wt>, [<Xn|SP>, (<Wm>|<Xm>)<extend> {<amount>}] LDRSH <Xt>, [<Xn|SP>, (<Wm>|<Xm>)<extend> {<amount>}]

Instance Method Summary collapse

Constructor Details

#initialize(rt, rn, rm, s, option, opc) ⇒ LDRSH_reg

Returns a new instance of LDRSH_reg.



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

def initialize rt, rn, rm, s, option, opc
  @rt     = check_mask(rt, 0x1f)
  @rn     = check_mask(rn, 0x1f)
  @rm     = check_mask(rm, 0x1f)
  @s      = check_mask(s, 0x01)
  @option = check_mask(option, 0x07)
  @opc    = check_mask(opc, 0x03)
end

Instance Method Details

#encode(_) ⇒ Object



17
18
19
# File 'lib/aarch64/instructions/ldrsh_reg.rb', line 17

def encode _
  LDRSH_reg(@opc, @rm, @option, @s, @rn, @rt)
end