Class: AArch64::Instructions::LDRSW_unsigned

Inherits:
Instruction
  • Object
show all
Defined in:
lib/aarch64/instructions/ldrsw_unsigned.rb

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(rt, rn, imm12) ⇒ LDRSW_unsigned

Returns a new instance of LDRSW_unsigned.



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

def initialize rt, rn, imm12
  @rt    = check_mask(rt, 0x1f)
  @rn    = check_mask(rn, 0x1f)
  @imm12 = check_mask(imm12, 0xfff)
end

Instance Method Details

#encode(_) ⇒ Object



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

def encode _
  LDRSW_unsigned(@imm12, @rn, @rt)
end