Class: AArch64::Instructions::LDRSB_imm

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

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(rt, rn, imm9, option, opc) ⇒ LDRSB_imm

Returns a new instance of LDRSB_imm.



12
13
14
15
16
17
18
# File 'lib/aarch64/instructions/ldrsb_imm.rb', line 12

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

Instance Method Details

#encode(_) ⇒ Object



20
21
22
# File 'lib/aarch64/instructions/ldrsb_imm.rb', line 20

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