Class: AArch64::Instructions::LDRB_reg

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

Overview

LDRB (register) – A64 Load Register Byte (register) LDRB <Wt>, [<Xn|SP>, (<Wm>|<Xm>), <extend> <amount>] LDRB <Wt>, [<Xn|SP>, <Xm>LSL <amount>]

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of LDRB_reg.



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

def initialize rt, rn, rm, s, option
  @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)
end

Instance Method Details

#encode(_) ⇒ Object



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

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