Class: AArch64::Instructions::STRH_reg

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

Overview

STRH (register) – A64 Store Register Halfword (register) STRH <Wt>, [<Xn|SP>, (<Wm>|<Xm>)<extend> {<amount>}]

Instance Method Summary collapse

Constructor Details

#initialize(rt, rn, rm, option, s) ⇒ STRH_reg

Returns a new instance of STRH_reg.



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

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

Instance Method Details

#encode(_) ⇒ Object



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

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