Browse Source

Merge branch '20130530_portablecpu' into bfgminer

Luke Dashjr 12 years ago
parent
commit
ac40201abe
4 changed files with 6 additions and 6 deletions
  1. 1 0
      configure.ac
  2. 3 3
      driver-cpu.h
  3. 1 2
      x86_64/sha256_sse4_amd64.asm
  4. 1 1
      x86_64/sha256_xmm_amd64.asm

+ 1 - 0
configure.ac

@@ -540,6 +540,7 @@ fi
 if test "x$has_yasm" = "xfalse" ; then
 if test "x$has_yasm" = "xfalse" ; then
   AC_MSG_NOTICE([yasm is required for the assembly algorithms. They will be skipped.])
   AC_MSG_NOTICE([yasm is required for the assembly algorithms. They will be skipped.])
 else
 else
+	AC_DEFINE([HAVE_YASM], [1], [Defined to 1 if yasm is being used])
 	if test "x$have_win32$have_cygwin" != "xfalsefalse"; then
 	if test "x$have_win32$have_cygwin" != "xfalsefalse"; then
 		if test "x$have_x86_64" = xtrue; then
 		if test "x$have_x86_64" = xtrue; then
 			YASM_FMT="win64"
 			YASM_FMT="win64"

+ 3 - 3
driver-cpu.h

@@ -18,7 +18,7 @@
 #define WANT_ALTIVEC_4WAY 1
 #define WANT_ALTIVEC_4WAY 1
 #endif
 #endif
 
 
-#ifdef __i386__
+#if defined(__i386__) && defined(HAVE_YASM)
 #define WANT_X8632_SSE2 1
 #define WANT_X8632_SSE2 1
 #endif
 #endif
 
 
@@ -26,11 +26,11 @@
 #define WANT_VIA_PADLOCK 1
 #define WANT_VIA_PADLOCK 1
 #endif
 #endif
 
 
-#ifdef __x86_64__
+#if defined(__x86_64__) && defined(HAVE_YASM)
 #define WANT_X8664_SSE2 1
 #define WANT_X8664_SSE2 1
 #endif
 #endif
 
 
-#ifdef __x86_64__
+#if defined(__x86_64__) && defined(HAVE_YASM)
 #define WANT_X8664_SSE4 1
 #define WANT_X8664_SSE4 1
 #endif
 #endif
 
 

+ 1 - 2
x86_64/sha256_sse4_amd64.asm

@@ -166,8 +166,7 @@ LAB_LOOP:
 
 
 %macro	lab_loop_blk 0
 %macro	lab_loop_blk 0
 	movntdqa	xmm6, [data+rax*4]
 	movntdqa	xmm6, [data+rax*4]
-	movntdqa	xmm1, g_4sha256_k[rax*4]
-	paddd	xmm6, xmm1
+	paddd	xmm6, g_4sha256_k[rax*4]
 	add	rax, 4
 	add	rax, 4
 
 
 	paddd	xmm6, xmm10	; +h
 	paddd	xmm6, xmm10	; +h

+ 1 - 1
x86_64/sha256_xmm_amd64.asm

@@ -314,7 +314,7 @@ sha256_sse2_64_new:
     movdqa    [hash1+7*16], rH
     movdqa    [hash1+7*16], rH
 
 
     mov       data, hash1
     mov       data, hash1
-    mov       init, sha256_init
+    mov       init, qword sha256_init
 
 
     SHA_256
     SHA_256