Carry-less Multiplication (CLMUL) is an extension to the
x86
x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
instruction set used by
microprocessor
A microprocessor is a computer processor (computing), processor for which the data processing logic and control is included on a single integrated circuit (IC), or a small number of ICs. The microprocessor contains the arithmetic, logic, a ...
s from
Intel
Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, and Delaware General Corporation Law, incorporated in Delaware. Intel designs, manufactures, and sells computer compo ...
and
AMD which was proposed by Intel in March 2008 and made available in the
Intel Westmere processors announced in early 2010. Mathematically, the instruction implements multiplication of polynomials over the
finite field
In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field (mathematics), field that contains a finite number of Element (mathematics), elements. As with any field, a finite field is a Set (mathematics), s ...
GF(2) where the bitstring
represents the polynomial
. The CLMUL instruction also allows a more efficient implementation of the closely related multiplication of larger finite fields GF(2
''k'') than the traditional instruction set.
One use of these instructions is to improve the speed of applications doing block cipher encryption in
Galois/Counter Mode, which depends on finite field GF(2
''k'') multiplication. Another application is the fast calculation of
CRC values, including those used to implement the
LZ77
LZ77 and LZ78 are the two lossless data compression algorithms published in papers by Abraham Lempel and Jacob Ziv in 1977 and 1978.
They are also known as Lempel-Ziv 1 (LZ1) and Lempel-Ziv 2 (LZ2) respectively. These two algorithms form the basis ...
sliding window DEFLATE algorithm in
zlib
zlib ( or "zeta-lib", ) is a software library used for data compression as well as a data format. zlib was written by Jean-loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compre ...
and
pngcrush.
ARMv8 also has a version of CLMUL. SPARC calls their version XMULX, for "XOR multiplication".
New instructions
The instruction computes the 128-bit
carry-less product of two 64-bit values. The destination is a
128-bit XMM register. The source may be another XMM register or memory. An immediate operand specifies which halves of the 128-bit operands are multiplied.
Mnemonics specifying specific values of the immediate operand are also defined:
A EVEX vectorized version (VPCLMULQDQ) is seen in
AVX-512.
CPUs with CLMUL instruction set
*
Intel
Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, and Delaware General Corporation Law, incorporated in Delaware. Intel designs, manufactures, and sells computer compo ...
**
Westmere processor (March 2010).
**
Sandy Bridge
Sandy Bridge is the List of Intel codenames, codename for Intel's 32 nm process, 32 nm microarchitecture used in the second generation of the Intel Core, Intel Core processors (Intel Core i7, Core i7, Intel Core i5, i5, Intel Core i3, i3). The Sa ...
processor
**
Ivy Bridge processor
**
Haswell processor
**
Broadwell processor (with increased throughput and lower latency)
**
Skylake (and later) processor
**
Goldmont processor
*
AMD:
**
Jaguar-based processors and newer
**
Puma-based processors and newer
** "Heavy Equipment" processors
***
Bulldozer-based processors
***
Piledriver-based processors
***
Steamroller-based processors
***
Excavator-based processors and newer
**
Zen
Zen (; from Chinese: ''Chán''; in Korean: ''Sŏn'', and Vietnamese: ''Thiền'') is a Mahayana Buddhist tradition that developed in China during the Tang dynasty by blending Indian Mahayana Buddhism, particularly Yogacara and Madhyamaka phil ...
processors
**
Zen+ processors
**
Zen2 (and later) processors
The presence of the CLMUL instruction set can be checked by testing one of the
CPU feature bits.
See also
*
Finite field arithmetic
*
AES instruction set
*
FMA3 instruction set
*
FMA4 instruction set
*
AVX instruction set
References
{{Multimedia extensions, state=uncollapsed
X86 architecture
X86 instructions