Class: AArch64::Instructions::REV

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

Overview

REV – A64 Reverse Bytes REV <Wd>, <Wn> REV <Xd>, <Xn>

Instance Method Summary collapse

Constructor Details

#initialize(rd, rn, sf, opc) ⇒ REV

Returns a new instance of REV.



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

def initialize rd, rn, sf, opc
  @rd  = check_mask(rd, 0x1f)
  @rn  = check_mask(rn, 0x1f)
  @sf  = check_mask(sf, 0x01)
  @opc = check_mask(opc, 0x03)
end

Instance Method Details

#encode(_) ⇒ Object



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

def encode _
  REV(@sf, @rn, @rd, @opc)
end