Class: AArch64::Instructions::LDR_imm_unsigned

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

Overview

LDR (immediate) – A64 Load Register (immediate) LDR <Wt>, [<Xn|SP>#<pimm>] LDR <Xt>, [<Xn|SP>#<pimm>]

Instance Method Summary collapse

Constructor Details

#initialize(rt, rn, imm12, size) ⇒ LDR_imm_unsigned

Returns a new instance of LDR_imm_unsigned.



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

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

Instance Method Details

#encode(_) ⇒ Object



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

def encode _
  LDR_imm_gen(@size, @imm12, @rn, @rt)
end