Browse Source

Merge commit 'a632372' into bfgminer

Luke Dashjr 13 years ago
parent
commit
327cd645e9
4 changed files with 8 additions and 4 deletions
  1. 2 1
      sha256_4way.c
  2. 2 1
      sha256_cryptopp.c
  3. 2 1
      sha256_generic.c
  4. 2 1
      sha256_via.c

+ 2 - 1
sha256_4way.c

@@ -116,7 +116,6 @@ bool ScanHash_4WaySSE2(struct thr_info*thr, const unsigned char *pmidstate,
         unsigned int thash[9][NPAR] __attribute__((aligned(128)));
 	int j;
 
-	nonce += NPAR;
 	*nNonce_p = nonce;
 
         DoubleBlockSHA256(pdata, phash1, pmidstate, thash, pSHA256InitState);
@@ -144,6 +143,8 @@ bool ScanHash_4WaySSE2(struct thr_info*thr, const unsigned char *pmidstate,
             *last_nonce = nonce;
             return false;
         }
+
+		nonce += NPAR;
     }
 }
 

+ 2 - 1
sha256_cryptopp.c

@@ -106,7 +106,6 @@ bool scanhash_cryptopp(struct thr_info*thr, const unsigned char *midstate,
 	data += 64;
 
 	while (1) {
-		n++;
 		*nonce = n;
 
 		runhash(hash1, data, midstate);
@@ -121,6 +120,8 @@ bool scanhash_cryptopp(struct thr_info*thr, const unsigned char *midstate,
 			*last_nonce = n;
 			return false;
 		}
+
+		n++;
 	}
 }
 

+ 2 - 1
sha256_generic.c

@@ -252,7 +252,6 @@ bool scanhash_c(struct thr_info*thr, const unsigned char *midstate, unsigned cha
 	data += 64;
 
 	while (1) {
-		n++;
 		*nonce = n;
 
 		runhash(hash1, data, midstate);
@@ -269,6 +268,8 @@ bool scanhash_c(struct thr_info*thr, const unsigned char *midstate, unsigned cha
 			*last_nonce = n;
 			return false;
 		}
+
+		n++;
 	}
 }
 

+ 2 - 1
sha256_via.c

@@ -42,7 +42,6 @@ bool scanhash_via(struct thr_info*thr, const unsigned char __maybe_unused *pmids
 	swap32yes(data32, data_inout, 128/4);
 
 	while (1) {
-		n++;
 		*nonce = n;
 
 		/* first SHA256 transform */
@@ -71,6 +70,8 @@ bool scanhash_via(struct thr_info*thr, const unsigned char __maybe_unused *pmids
 			*last_nonce = n;
 			return false;
 		}
+
+		n++;
 	}
 }