Class: AArch64::Instructions::CCMP_imm

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

Overview

CCMP (immediate) – A64 Conditional Compare (immediate) CCMP <Wn>, #<imm>, #<nzcv>, <cond> CCMP <Xn>, #<imm>, #<nzcv>, <cond>

Instance Method Summary collapse

Constructor Details

#initialize(rn, imm, nzcv, cond, sf) ⇒ CCMP_imm

Returns a new instance of CCMP_imm.



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

def initialize rn, imm, nzcv, cond, sf
  @rn   = check_mask(rn, 0x1f)
  @imm  = check_mask(imm, 0x1f)
  @nzcv = check_mask(nzcv, 0x0f)
  @cond = check_mask(cond, 0x0f)
  @sf   = check_mask(sf, 0x01)
end

Instance Method Details

#encode(_) ⇒ Object



16
17
18
# File 'lib/aarch64/instructions/ccmp_imm.rb', line 16

def encode _
  CCMP_imm(@sf, @imm, @cond, @rn, @nzcv)
end