Class: AArch64::Instructions::LDRB_imm

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

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(rt, rn, imm9, option) ⇒ LDRB_imm

Returns a new instance of LDRB_imm.



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

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

Instance Method Details

#encode(_) ⇒ Object



16
17
18
# File 'lib/aarch64/instructions/ldrb_imm.rb', line 16

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