From 5391edca0d639f5dc330463b9505b7b8c1e4d063 Mon Sep 17 00:00:00 2001 From: jsteube Date: Mon, 5 Feb 2018 19:39:20 +0100 Subject: [PATCH] Weird macOS JiT likes this more --- OpenCL/inc_hash_functions.cl | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/OpenCL/inc_hash_functions.cl b/OpenCL/inc_hash_functions.cl index 28926aed8..b895af3f1 100644 --- a/OpenCL/inc_hash_functions.cl +++ b/OpenCL/inc_hash_functions.cl @@ -136,26 +136,30 @@ #define SHA1_F2o(x,y,z) (SHA1_F2 ((x), (y), (z))) #endif -#define SHA1_STEP_S(f,a,b,c,d,e,x) \ -{ \ - e = __add3_S (e, x, f (b, c, d)); \ - e = __add3_S (e, K, rotl32_S (a, 5u)); \ - b = rotl32_S (b, 30u); \ -} - -#define SHA1_STEP(f,a,b,c,d,e,x) \ +#define SHA1_STEP_S(f,a,b,c,d,e,x) \ { \ - e = __add3 (e, x, f (b, c, d)); \ - e = __add3 (e, K, rotl32 (a, 5u)); \ - b = rotl32 (b, 30u); \ + e += K; \ + e = __add3_S (e, x, f (b, c, d)); \ + e += rotl32_S (a, 5u); \ + b = rotl32_S (b, 30u); \ } +#define SHA1_STEP(f,a,b,c,d,e,x) \ +{ \ + e += K; \ + e = __add3 (e, x, f (b, c, d)); \ + e += rotl32 (a, 5u); \ + b = rotl32 (b, 30u); \ +} + +/* #define SHA1_STEP0(f,a,b,c,d,e,x) \ { \ e = __add3 (e, K, f (b, c, d)); \ e += rotl32 (a, 5u); \ b = rotl32 (b, 30u); \ } +*/ #define SHA1_STEPX(f,a,b,c,d,e,x) \ { \