Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

_mm_clmulepi64_si128 pclmulqdq emulation

Cryptographer
Beginner
354 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
354 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
Thomas_W_Intel
Employee
354 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.

David_L_6
Beginner
354 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

 

Reply