Class: AArch64::Instructions::UBFM

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

Overview

UBFM – A64 Unsigned Bitfield Move UBFM <Wd>, <Wn>, #<immr>, #<imms> UBFM <Xd>, <Xn>, #<immr>, #<imms>

Instance Method Summary collapse

Constructor Details

#initialize(rd, rn, immr, imms, sf) ⇒ UBFM

Returns a new instance of UBFM.



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

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

Instance Method Details

#encode(_) ⇒ Object



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

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