Class: AArch64::Instructions::MOVZ

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

Overview

MOVZ – A64 Move wide with zero MOVZ <Wd>, #<imm>LSL #<shift> MOVZ <Xd>, #<imm>LSL #<shift>

Instance Method Summary collapse

Constructor Details

#initialize(reg, imm, shift, sf) ⇒ MOVZ

Returns a new instance of MOVZ.



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

def initialize reg, imm, shift, sf
  @reg   = check_mask(reg, 0x1f)
  @imm   = check_mask(imm, 0xffff)
  @shift = check_mask(shift, 0x03)
  @sf    = check_mask(sf, 0x01)
end

Instance Method Details

#encode(_) ⇒ Object



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

def encode _
  MOVZ(@sf, @shift, @imm, @reg)
end