Class: AArch64::Instructions::LDP_gen

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

Overview

LDP – A64 Load Pair of Registers LDP <Wt1>, <Wt2>, [<Xn|SP>], #<imm> LDP <Xt1>, <Xt2>, [<Xn|SP>], #<imm> LDP <Wt1>, <Wt2>, [<Xn|SP>, #<imm>]! LDP <Xt1>, <Xt2>, [<Xn|SP>, #<imm>]! LDP <Wt1>, <Wt2>, [<Xn|SP>#<imm>] LDP <Xt1>, <Xt2>, [<Xn|SP>#<imm>]

Instance Method Summary collapse

Constructor Details

#initialize(rt, rt2, rn, imm7, mode, opc) ⇒ LDP_gen

Returns a new instance of LDP_gen.



12
13
14
15
16
17
18
19
# File 'lib/aarch64/instructions/ldp_gen.rb', line 12

def initialize rt, rt2, rn, imm7, mode, opc
  @rt   = check_mask(rt, 0x1f)
  @rt2  = check_mask(rt2, 0x1f)
  @rn   = check_mask(rn, 0x1f)
  @imm7 = check_mask(imm7, 0x7f)
  @mode = check_mask(mode, 0x07)
  @opc  = check_mask(opc, 0x03)
end

Instance Method Details

#encode(_) ⇒ Object



21
22
23
# File 'lib/aarch64/instructions/ldp_gen.rb', line 21

def encode _
  LDP_gen(@opc, @mode, @imm7, @rt2, @rn, @rt)
end