Class: AArch64::Instructions::MOVN

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

Overview

MOVN – A64 Move wide with NOT MOVN <Wd>, #<imm>LSL #<shift> MOVN <Xd>, #<imm>LSL #<shift>

Instance Method Summary collapse

Constructor Details

#initialize(rd, imm16, hw, sf) ⇒ MOVN

Returns a new instance of MOVN.



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

def initialize rd, imm16, hw, sf
  @rd    = check_mask(rd, 0x1f)
  @imm16 = check_mask(imm16, 0xffff)
  @hw    = check_mask(hw, 0x03)
  @sf    = check_mask(sf, 0x01)
end

Instance Method Details

#encode(_) ⇒ Object



15
16
17
# File 'lib/aarch64/instructions/movn.rb', line 15

def encode _
  MOVN(@sf, @hw, @imm16, @rd)
end