Class: AArch64::Instructions::CRC32C

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

Overview

CRC32CB, CRC32CH, CRC32CW, CRC32CX – A64 CRC32C checksum CRC32CB <Wd>, <Wn>, <Wm> CRC32CH <Wd>, <Wn>, <Wm> CRC32CW <Wd>, <Wn>, <Wm> CRC32CX <Wd>, <Wn>, <Xm>

Instance Method Summary collapse

Constructor Details

#initialize(rd, rn, rm, sz, sf) ⇒ CRC32C

Returns a new instance of CRC32C.



10
11
12
13
14
15
16
# File 'lib/aarch64/instructions/crc32c.rb', line 10

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

Instance Method Details

#encode(_) ⇒ Object



18
19
20
# File 'lib/aarch64/instructions/crc32c.rb', line 18

def encode _
  CRC32C(@sf, @rm, @sz, @rn, @rd)
end