Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.

_mm_clmulepi64_si128 pclmulqdq emulation

Cryptographer
Beginner
674 Views
Is therea subroutine to emulate the new_mm_clmulepi64_si128() intrinsic?
I have tried SDE, but this tool does not allow me to stop at VS2008 breakpoints for debugging.
0 Kudos
3 Replies
MarkC_Intel
Moderator
674 Views
Hi, Yes, VS2008 support for SDE is currently lacking. If you can use linux, recent GDB releases work very well with Intel SDE.

If you cannot use linux, then you can also try using "sde -debugtrace -- yourapp" (see sde -thelp for the full list of knobs; there are many). This will show you the memory reads/writes and register writes for all instructions. (Look upwards in the output file to find the last write of a particular register that gets read).
The debugtrace option can be "disk filler" for long running applications. There is circular buffer support and start/stop triggering options available in the various -dt-* knobs.
Regards,
Mark
0 Kudos
Thomas_W_Intel
Employee
674 Views

I'm not aware of a ready-made subroutine to emulate the new _mm_clmulepi64_si128() intrinsic. However, it should be not too hard to write your own based on the pseudo code describing PCLMULQDQ. It is available, for example, in this article.

0 Kudos
David_L_6
Beginner
674 Views

Thomas - thanks for the pseudo code link!

I have ported igzip from Linux to MSVS 2010 C/C++ (and YASM) successfully (yay!) but my target system does not support pclmulqdq.

I have looked for a .ASM macro to replace it (one supposedly resides in GAS, but I downloaded binutils 2.24 and did not find a reference to the instruction outside of the disassembler) but have had no luck.  I do have the pseudo code (thanks Thomas again) and can build a 'C' version, but that is not optimal (and of course there will be no bugs in my code.... ya, right...).

Anybody out there with code/guidance?

Thanks,

Dave

 

0 Kudos
Reply