Class: AArch64::Instructions::LDR_lit_gen

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

Overview

LDR (literal) – A64 Load Register (literal) LDR <Wt>, <label> LDR <Xt>, <label>

Instance Method Summary collapse

Constructor Details

#initialize(rt, imm19, size) ⇒ LDR_lit_gen

Returns a new instance of LDR_lit_gen.



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

def initialize rt, imm19, size
  @rt    = check_mask(rt, 0x1f)
  @imm19 = imm19
  @size  = check_mask(size, 0x3)
end

Instance Method Details

#encode(pos) ⇒ Object



14
15
16
# File 'lib/aarch64/instructions/ldr_lit_gen.rb', line 14

def encode pos
  LDR_lit_gen(@size, check_mask(unwrap_label(@imm19, pos), 0x7ffff), @rt)
end