Class: AArch64::Instructions::EXTR

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

Overview

EXTR – A64 Extract register EXTR <Wd>, <Wn>, <Wm>, #<lsb> EXTR <Xd>, <Xn>, <Xm>, #<lsb>

Instance Method Summary collapse

Constructor Details

#initialize(rd, rn, rm, lsb, sf) ⇒ EXTR

Returns a new instance of EXTR.



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

def initialize rd, rn, rm, lsb, sf
  @rd  = check_mask(rd, 0x1f)
  @rn  = check_mask(rn, 0x1f)
  @rm  = check_mask(rm, 0x1f)
  @lsb = check_mask(lsb, 0x3f)
  @sf  = check_mask(sf, 0x01)
end

Instance Method Details

#encode(_) ⇒ Object



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

def encode _
  EXTR(@sf, @sf, @rm, @lsb, @rn, @rd)
end