Class: AArch64::Instructions::STP_gen

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

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(rt, rt2, rn, imm7, opc, option) ⇒ STP_gen

Returns a new instance of STP_gen.



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

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

Instance Method Details

#encode(_) ⇒ Object



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

def encode _
  STP_gen(@opc, @option, @imm7, @rt2, @rn, @rt)
end