Class: AArch64::Instructions::CASP

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

Overview

CASP, CASPA, CASPAL, CASPL – A64 Compare and Swap Pair of words or doublewords in memory CASP <Ws>, <W(s+1)>, <Wt>, <W(t+1)>, [<Xn|SP>,,#0] CASPA <Ws>, <W(s+1)>, <Wt>, <W(t+1)>, [<Xn|SP>,,#0] CASPAL <Ws>, <W(s+1)>, <Wt>, <W(t+1)>, [<Xn|SP>,,#0] CASPL <Ws>, <W(s+1)>, <Wt>, <W(t+1)>, [<Xn|SP>,,#0] CASP <Xs>, <X(s+1)>, <Xt>, <X(t+1)>, [<Xn|SP>,,#0] CASPA <Xs>, <X(s+1)>, <Xt>, <X(t+1)>, [<Xn|SP>,,#0] CASPAL <Xs>, <X(s+1)>, <Xt>, <X(t+1)>, [<Xn|SP>,,#0] CASPL <Xs>, <X(s+1)>, <Xt>, <X(t+1)>, [<Xn|SP>,,#0]

Instance Method Summary collapse

Constructor Details

#initialize(rs, rt, rn, l, o0, sf) ⇒ CASP

Returns a new instance of CASP.



14
15
16
17
18
19
20
21
# File 'lib/aarch64/instructions/casp.rb', line 14

def initialize rs, rt, rn, l, o0, sf
  @rs = check_mask(rs, 0x1f)
  @rt = check_mask(rt, 0x1f)
  @rn = check_mask(rn, 0x1f)
  @l  = check_mask(l, 0x01)
  @o0 = check_mask(o0, 0x01)
  @sf = check_mask(sf, 0x01)
end

Instance Method Details

#encode(_) ⇒ Object



23
24
25
# File 'lib/aarch64/instructions/casp.rb', line 23

def encode _
  CASP(@sf, @l, @rs, @o0, @rn, @rt)
end