Skip to content

Commit

Permalink
Weird macOS JiT likes this more
Browse files Browse the repository at this point in the history
  • Loading branch information
jsteube committed Feb 5, 2018
1 parent a3a16f6 commit 5391edc
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions OpenCL/inc_hash_functions.cl
Original file line number Diff line number Diff line change
Expand Up @@ -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_S(f,a,b,c,d,e,x) \
{ \
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 = __add3 (e, x, f (b, c, d)); \
e = __add3 (e, K, rotl32 (a, 5u)); \
b = rotl32 (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) \
{ \
Expand Down

0 comments on commit 5391edc

Please sign in to comment.