Add SSSE3 imnplementation ofg block copy function, gives us ~30% kernel scanning...
[novacoin.git] / src / crypto / sha2 / asm / sha2-x86.S
index 65f2062..044630f 100644 (file)
@@ -1188,4 +1188,28 @@ sha256_use_4way_sse2:
     popl    %ebx
     ret
 
+#if defined(USE_SSSE3)
+    .text
+    .p2align 5
+    .globl sha256_use_ssse3
+    .globl _sha256_use_ssse3
+sha256_use_ssse3:
+_sha256_use_ssse3:
+    pushl    %ebx
+    
+    movl    $1, %eax
+    cpuid
+    andl    $0x00000200, %ecx
+    jnz sha256_use_ssse3
+    xorl    %eax, %eax
+    popl    %ebx
+    ret
+    
+sha256_use_ssse3:
+    movl    $1, %eax
+    popl    %ebx
+    ret
+#endif
+
+
 #endif