crc32h

Cyclic Redundancy Check 32-bit Halfword

crc32h RA, RS

Accumulates a CRC32 checksum using the low halfword of RS.

Encoding

Binary Layout
31
0:5
RS
6:10
RA
11:15
0
16:20
586
21:30
/
31
 
Format X-form
Opcode 0x7C00024A
Extension Base

Operands

  • RA
    Target/Accumulator
  • RS
    Data

Example

crc32h r4, r3

Related

More in Base

Reference

Description

Accumulates a 32-bit CRC checksum using the low halfword (bits 48-63) of RS, with the running CRC value in RA. The updated CRC result is written to RA. This is a Base-category instruction with no CR, XER, or FPSCR updates.

Operation

halfword_val ← RS[48:63]; crc ← RA ⊕ (halfword_val || [0]*16); for i in 0 to 15 do; if (crc[31] = 1) then crc ← (crc << 1) ⊕ 0x04C11DB7; else crc ← crc << 1; crc ← crc ∧ 0xFFFFFFFF; RA ← crc;