Class: AArch64::Instructions::ANDS_log_imm

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

Overview

ANDS (immediate) – A64 Bitwise AND (immediate), setting flags ANDS <Wd>, <Wn>, #<imm> ANDS <Xd>, <Xn>, #<imm>

Instance Method Summary collapse

Constructor Details

#initialize(rd, rn, immr, imms, n, sf) ⇒ ANDS_log_imm

Returns a new instance of ANDS_log_imm.



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

def initialize rd, rn, immr, imms, n, sf
  @rd   = check_mask(rd, 0x1f)
  @rn   = check_mask(rn, 0x1f)
  @immr = check_mask(immr, 0x3f)
  @imms = check_mask(imms, 0x3f)
  @n    = check_mask(n, 0x01)
  @sf   = check_mask(sf, 0x01)
end

Instance Method Details

#encode(_) ⇒ Object



17
18
19
# File 'lib/aarch64/instructions/ands_log_imm.rb', line 17

def encode _
  ANDS_log_imm(@sf, @n, @immr, @imms, @rn, @rd)
end