simde icon indicating copy to clipboard operation
simde copied to clipboard

CLMUL - remaining functions

Open Torinde opened this issue 3 months ago • 2 comments

https://en.wikipedia.org/wiki/CLMUL_instruction_set

  • 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.

PCLMULQDQ is already implemented: https://github.com/simd-everywhere/implementation-status/blob/main/x86.md#pclmulqdq

Torinde avatar Mar 28 '24 10:03 Torinde

There is no intrinsic defined for PCLMULLQLQDQ, it seems..

mr-c avatar Mar 28 '24 11:03 mr-c

PCLMUL[L/H]Q[L/H]QDQ is a "Mnemonic specifying specific values of the immediate operand".

So it is just some cheeky disassembly naming.

aka. PCLMULQDQ(a, b, 0) == PCLMULLQLQDQ(a, b)

SIMDe operates at the intrinsic level so CLMUL is at 100% completion.

Someone could add SIMDe extensions for the mnemonics but... no one is going to be able to find them. Maybe a source code comment on _mm_clmulepi64_si128 to mention the other mnemonic names would make it greppable?

aqrit avatar Apr 06 '24 17:04 aqrit