Carry-less Multiplication (CLMUL) is an extension to the
x86 instruction set used by
microprocessor
A microprocessor is a computer processor where the data processing logic and control is included on a single integrated circuit, or a small number of integrated circuits. The microprocessor contains the arithmetic, logic, and control circu ...
s from
Intel
Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the devel ...
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 that contains a finite number of elements. As with any field, a finite field is a set on which the operations of multiplication, addition, subt ...
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
In cryptography, Galois/Counter Mode (GCM) is a mode of operation for symmetric-key cryptographic block ciphers which is widely adopted for its performance. GCM throughput rates for state-of-the-art, high-speed communication channels can be achie ...
, 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 sliding window
A sliding window protocol is a feature of packet-based data transmission protocols. Sliding window protocols are used where reliable in-order delivery of packets is required, such as in the data link layer ( OSI layer 2) as well as in the Tran ...
DEFLATE algorithm in
zlib 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
The carry-less product of two binary numbers
is the result of carry-less multiplication of these numbers.
This operation conceptually works like long multiplication
except for the fact that the carry
is discarded instead of applied to the more si ...
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
A mnemonic ( ) device, or memory device, is any learning technique that aids information retention or retrieval (remembering) in the human memory for better understanding.
Mnemonics make use of elaborative encoding, retrieval cues, and imager ...
specifying specific values of the immediate operand are also defined:
A EVEX vectorized version (VPCLMULQDQ) is seen in
AVX-512 AVX-512 are 512-bit extensions to the 256-bit Advanced Vector Extensions SIMD instructions for x86 instruction set architecture (ISA) proposed by Intel in July 2013, and implemented in Intel's Xeon Phi x200 (Knights Landing) and Skylake-X CPUs; ...
.
CPUs with CLMUL instruction set
*
Intel
Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the devel ...
**
Westmere processor (March 2010).
**
Sandy Bridge processor
**
Ivy Bridge processor
**
Haswell processor
**
Broadwell processor (with increased throughput and lower latency)
**
Skylake Skylake or Sky Lake may refer to:
* Skylake (microarchitecture), the codename for a processor microarchitecture developed by Intel as the successor to Broadwell
* Skylake (Mysia), a town of ancient Mysia, now in Turkey
* Sky Lake, Florida
Sky La ...
(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 ( zh, t=禪, p=Chán; ja, text= 禅, translit=zen; ko, text=선, translit=Seon; vi, text=Thiền) is a school of Mahayana Buddhism that originated in China during the Tang dynasty, known as the Chan School (''Chánzong'' 禪宗), and ...
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 In mathematics, finite field arithmetic is arithmetic in a finite field (a field containing a finite number of elements) contrary to arithmetic in a field with an infinite number of elements, like the field of rational numbers.
There are infinit ...
*
AES instruction set
*
FMA3 instruction set
The FMA instruction set is an extension to the 128 and 256-bit Streaming SIMD Extensions instructions in the x86 microprocessor instruction set to perform fused multiply–add (FMA) operations."FMA3 and FMA4 are not instruction sets, they are i ...
*
FMA4 instruction set
*
AVX instruction set
References
{{Multimedia extensions, state=uncollapsed
X86 architecture
X86 instructions