Hi Everyone,

This caught my eye recently: "cryptest.exe reports wrong CPU features for 
Core2 duo", http://github.com/weidai11/cryptopp/issues/176. I think it 
managed to stay under the radar because most of the hardware today is fully 
featured.

I'm trying to craft a test for cryptest.sh to detect the condition, but its 
turning out to be tricky. We can parse the output of 'cryptest.exe v' and 
capture hasMMX, hasSSE2, etc. We can then compare it against what we expect 
from `-march=native` preprocessor macros when `-march=native` is available. 
However, the tricky part is capturing all the features in one execution of 
'cryptest.exe'.

I was thinking we may want a 'cryptest.exe f' to dump the feature strings 
shown in this line:

    passed:  hasMMX == 1, hasISSE == 1, hasSSE2 == 1, hasSSSE3 == 0,
    hasSSE4 == 1, hasAESNI == 0, hasRDRAND == 0, hasRDSEED == 0,
    hasCLMUL == 0, isP4 == 0, cacheLineSize == 64, AESNI_INTRINSICS == 1

We could also add information on the features from the compile-time 
environment, like:

    $ g++ -march=native -dM -E - </dev/null | egrep -i 
'(sse|aes|rdrnd|rdseed|bmi)'
    #define __SSE4_1__ 1
    #define __SSE4_2__ 1
    #define __SSE2_MATH__ 1
    #define __SSE_MATH__ 1
    #define __SSE2__ 1
    #define __SSSE3__ 1
    #define __RDRND__ 1
    #define __SSE__ 1
    #define __RDSEED__ 1
    #define __BMI2__ 1
    #define __AES__ 1
    #define __BMI__ 1
    #define __SSE3__ 1

What does everyone think?

Jeff




-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to