From bc138413d9098d6ed285df1bdebc70b47f69bcac Mon Sep 17 00:00:00 2001 From: Philipp Otterbein Date: Mon, 19 Feb 2018 17:05:01 +0100 Subject: [PATCH] fix minor regression --- kernel/ethash-new.cl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/ethash-new.cl b/kernel/ethash-new.cl index 0881a43e..a47ac7df 100644 --- a/kernel/ethash-new.cl +++ b/kernel/ethash-new.cl @@ -14,7 +14,7 @@ uint2 amd_bitalign(uint2 src0, uint2 src1, uint2 src2) "v_alignbit_b32 %1, %5, %6, %7" : "=v" (dst.x), "=v" (dst.y) : "v" (src0.x), "v" (src1.x), "v" (src2.x), - "v" (src0.y), "v" (src1.y), "v" (src2.y)); + "v" (src0.y), "v" (src1.y), "v" (src2.y)); return dst; } @@ -186,8 +186,9 @@ uint2 ROTL64_2(uint2 x, int y) { #define KECCAK_PROCESS(st, in_size, out_size, isolate) do { \ - for (int r = 0; r < (23 + !(isolate)); r++) { \ - KECCAKF_1600_RND(st, r, 25); \ + for (int r = 0;r < (23);) { \ + if (isolate) \ + KECCAKF_1600_RND(st, r++, 25); \ } \ KECCAKF_1600_RND(st, 23, out_size); \ } while(0)