Class: AArch64::Instructions::LDR_imm_gen

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

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(rt, rn, imm9, size, mode) ⇒ LDR_imm_gen

Returns a new instance of LDR_imm_gen.



10
11
12
13
14
15
16
# File 'lib/aarch64/instructions/ldr_imm_gen.rb', line 10

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

Instance Method Details

#encode(_) ⇒ Object



18
19
20
# File 'lib/aarch64/instructions/ldr_imm_gen.rb', line 18

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