noloader / SHA-Intrinsics

SHA-1, SHA-256 and SHA-512 compression functions using Intel, ARMv8 and Power8 SHA intrinsics
197 stars 40 forks source link

Unsupported SHA-NI #9

Closed mrx23dot closed 1 year ago

mrx23dot commented 2 years ago

I have a kinda new CPU i7 10510U cpuZ says: Instructions sets: MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, EM64T, VT-x, AES, AVX, AVX2, FMA3

but gcc -msse4 -msha cpuid.c says "This CPU does not support SHA-NI"

Also intel pdf only mentions sha1 and sha256 extension, not 512.

asdasf

    CPUID        
    0x00000000      0x00000016  0x756E6547  0x6C65746E  0x49656E69
    0x00000001      0x000806EC  0x00100800  0x7FFAFBBF  0xBFEBFBFF
    0x00000002      0x76036301  0x00F0B5FF  0x00000000  0x00C30000
    0x00000003      0x00000000  0x00000000  0x00000000  0x00000000
    0x00000004      0x1C004121  0x01C0003F  0x0000003F  0x00000000
    0x00000004      0x1C004122  0x01C0003F  0x0000003F  0x00000000
    0x00000004      0x1C004143  0x00C0003F  0x000003FF  0x00000000
    0x00000004      0x1C03C163  0x03C0003F  0x00001FFF  0x00000006
    0x00000005      0x00000040  0x00000040  0x00000003  0x11142120
    0x00000006      0x000027F7  0x00000002  0x00000009  0x00000000
    0x00000007      0x00000000  0x029C67AF  0x00000000  0xBC000400
    0x00000008      0x00000000  0x00000000  0x00000000  0x00000000
    0x00000009      0x00000000  0x00000000  0x00000000  0x00000000
    0x0000000A      0x07300404  0x00000000  0x00000000  0x00000603
    0x0000000B      0x00000001  0x00000002  0x00000100  0x00000000
    0x0000000B      0x00000004  0x00000008  0x00000201  0x00000000
    0x0000000C      0x00000000  0x00000000  0x00000000  0x00000000
    0x0000000D      0x0000001F  0x00000440  0x00000440  0x00000000
    0x0000000D      0x0000000F  0x00000440  0x00000100  0x00000000
    0x0000000D      0x00000100  0x00000240  0x00000000  0x00000000
    0x0000000D      0x00000040  0x000003C0  0x00000000  0x00000000
    0x0000000D      0x00000040  0x00000400  0x00000000  0x00000000
    0x0000000E      0x00000000  0x00000000  0x00000000  0x00000000
    0x0000000F      0x00000000  0x00000000  0x00000000  0x00000000
Nielsbishere commented 1 year ago

AFAIK, SHA256 native instruction is Rocket lake (gen 11) and up (https://en.wikipedia.org/wiki/Intel_SHA_extensions) so you're out of luck, since you have gen 10

mrx23dot commented 1 year ago

Thank you!

mrx23dot commented 1 year ago

Please add compatibility list to readme.md