Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

CLMUL instruction set

From Wikipedia, the free encyclopedia
Extension to the x86 instruction set

Carry-less Multiplication (CLMUL) is an extension to thex86 instruction set used bymicroprocessors fromIntel andAMD which was proposed by Intel in March 2008[1] and made available in theIntel Westmere processors announced in early 2010. Mathematically, the instruction implements multiplication of polynomials over thefinite field GF(2) where the bitstringa0a1a63{\displaystyle a_{0}a_{1}\ldots a_{63}} represents the polynomiala0+a1X+a2X2++a63X63{\displaystyle a_{0}+a_{1}X+a_{2}X^{2}+\cdots +a_{63}X^{63}}. The CLMUL instruction also allows a more efficient implementation of the closely related multiplication of larger finite fields GF(2k) than the traditional instruction set.[2]

One use of these instructions is to improve the speed of applications doing block cipher encryption inGalois/Counter Mode, which depends on finite field GF(2k) multiplication. Another application is the fast calculation ofCRC values,[3] including those used to implement theLZ77sliding windowDEFLATE algorithm inzlib andpngcrush.[4]

ARMv8 also has a version of CLMUL. SPARC calls their version XMULX, for "XOR multiplication".

New instructions

[edit]

The instruction computes the 128-bitcarry-less product of two 64-bit values. The destination is a128-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:

InstructionOpcodeDescription
PCLMULQDQ xmmreg,xmmrm,imm[rmi: 66 0f 3a 44 /r ib]Perform a carry-less multiplication of two 64-bit polynomials over the finite fieldGF(2)[X].
PCLMULLQLQDQ xmmreg,xmmrm[rm:  66 0f 3a 44 /r 00]Multiply the low halves of the two registers.
PCLMULHQLQDQ xmmreg,xmmrm[rm:  66 0f 3a 44 /r 01]Multiply the high half of the destination register by the low half of the source register.
PCLMULLQHQDQ xmmreg,xmmrm[rm:  66 0f 3a 44 /r 10]Multiply the low half of the destination register by the high half of the source register.
PCLMULHQHQDQ xmmreg,xmmrm[rm:  66 0f 3a 44 /r 11]Multiply the high halves of the two registers.

A EVEX vectorized version (VPCLMULQDQ) is seen inAVX-512.

CPUs with CLMUL instruction set

[edit]

The presence of the CLMUL instruction set can be checked by testing one of theCPU feature bits.

See also

[edit]

References

[edit]
  1. ^"Intel Software Network". Intel. Archived fromthe original on 2008-04-07. Retrieved2008-04-05.
  2. ^Shay Gueron; Michael E. Kounavis (2014-04-20)."Intel Carry-Less Multiplication Instruction and its Usage for Computing the GCM Mode – Rev 2.02"(PDF).Intel. Archived fromthe original on 2019-08-06.
  3. ^"Fast CRC Computation for Generic Polynomials Using PCLMULQDQ"(PDF).
  4. ^Vlad Krasnov (2015-07-08)."Fighting Cancer: The Unexpected Benefit Of Open Sourcing Our Code".CloudFlare. Retrieved2016-09-04.
  5. ^Johan De Gelas (2017-03-31)."The Intel Xeon E5 v4 Review: Testing Broadwell-EP With Demanding Server Workloads".Anandtech. p. 3. Archived fromthe original on March 31, 2016.
  6. ^"Slide detailing improvements of Jaguar over Bobcat". AMD. 29 August 2012. RetrievedAugust 3, 2013.
  7. ^Dave Christie (6 May 2009)."Striking a balance". AMD Developer blogs. Archived fromthe original on 9 November 2013. Retrieved2011-03-11.
AMD technology
Software
Platforms
Current
Obsolete
Technology
Instructions
Intel technology
Platforms
Discontinued
Current
Upcoming
SIMD (RISC)
SIMD (x86)
Bit manipulation
  • BMI (ABM: 2007, BMI1: 2012, BMI2: 2013, TBM: 2012)
  • ADX (2014)
Compressed instructions
Security andcryptography
Transactional memory
Virtualization
Suspended extensions' dates arestruck through.
Retrieved from "https://en.wikipedia.org/w/index.php?title=CLMUL_instruction_set&oldid=1305156205"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp