Class: AArch64::Instructions::SWPH

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

Overview

SWPH, SWPAH, SWPALH, SWPLH – A64 Swap halfword in memory SWPAH <Ws>, <Wt>, [<Xn|SP>] SWPALH <Ws>, <Wt>, [<Xn|SP>] SWPH <Ws>, <Wt>, [<Xn|SP>] SWPLH <Ws>, <Wt>, [<Xn|SP>]

Instance Method Summary collapse

Constructor Details

#initialize(rs, rt, rn, a, r) ⇒ SWPH

Returns a new instance of SWPH.



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

def initialize rs, rt, rn, a, r
  @rs = rs
  @rt = rt
  @rn = rn
  @a  = a
  @r  = r
end

Instance Method Details

#encodeObject



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

def encode
  SWPH(@a, @r, @rs.to_i, @rn.to_i, @rt.to_i)
end