diff --git a/OpenCL/m07700_a0-optimized.cl b/OpenCL/m07700_a0-optimized.cl index 2c633028b..b62bf6ee6 100644 --- a/OpenCL/m07700_a0-optimized.cl +++ b/OpenCL/m07700_a0-optimized.cl @@ -17,8 +17,8 @@ #include "inc_hash_md5.cl" #endif -#define GETCHAR(a,p) (((a)[(p) / 4] >> (((p) & 3) * 8)) & 0xff) -#define PUTCHAR(a,p,c) ((a)[(p) / 4] = (((a)[(p) / 4] & ~(0xff << (((p) & 3) * 8))) | ((c) << (((p) & 3) * 8)))) +#define GETCHAR(a,p) ((u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) #define SETSHIFTEDINT(a,n,v) \ { \ diff --git a/OpenCL/m07700_a1-optimized.cl b/OpenCL/m07700_a1-optimized.cl index 525d9c257..216c29116 100644 --- a/OpenCL/m07700_a1-optimized.cl +++ b/OpenCL/m07700_a1-optimized.cl @@ -15,8 +15,8 @@ #include "inc_hash_md5.cl" #endif -#define GETCHAR(a,p) (((a)[(p) / 4] >> (((p) & 3) * 8)) & 0xff) -#define PUTCHAR(a,p,c) ((a)[(p) / 4] = (((a)[(p) / 4] & ~(0xff << (((p) & 3) * 8))) | ((c) << (((p) & 3) * 8)))) +#define GETCHAR(a,p) ((u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) #define SETSHIFTEDINT(a,n,v) \ { \ diff --git a/OpenCL/m07700_a3-optimized.cl b/OpenCL/m07700_a3-optimized.cl index 78927041b..211ec9f2f 100644 --- a/OpenCL/m07700_a3-optimized.cl +++ b/OpenCL/m07700_a3-optimized.cl @@ -15,8 +15,8 @@ #include "inc_hash_md5.cl" #endif -#define GETCHAR(a,p) (((a)[(p) / 4] >> (((p) & 3) * 8)) & 0xff) -#define PUTCHAR(a,p,c) ((a)[(p) / 4] = (((a)[(p) / 4] & ~(0xff << (((p) & 3) * 8))) | ((c) << (((p) & 3) * 8)))) +#define GETCHAR(a,p) ((u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) CONSTANT_VK u32a sapb_trans_tbl[256] = { diff --git a/OpenCL/m07701_a0-optimized.cl b/OpenCL/m07701_a0-optimized.cl index 99fbb8183..c816f9bf3 100644 --- a/OpenCL/m07701_a0-optimized.cl +++ b/OpenCL/m07701_a0-optimized.cl @@ -17,8 +17,8 @@ #include "inc_hash_md5.cl" #endif -#define GETCHAR(a,p) (((a)[(p) / 4] >> (((p) & 3) * 8)) & 0xff) -#define PUTCHAR(a,p,c) ((a)[(p) / 4] = (((a)[(p) / 4] & ~(0xff << (((p) & 3) * 8))) | ((c) << (((p) & 3) * 8)))) +#define GETCHAR(a,p) ((u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) #define SETSHIFTEDINT(a,n,v) \ { \ diff --git a/OpenCL/m07701_a1-optimized.cl b/OpenCL/m07701_a1-optimized.cl index 04609d8e0..a83fbddda 100644 --- a/OpenCL/m07701_a1-optimized.cl +++ b/OpenCL/m07701_a1-optimized.cl @@ -15,8 +15,8 @@ #include "inc_hash_md5.cl" #endif -#define GETCHAR(a,p) (((a)[(p) / 4] >> (((p) & 3) * 8)) & 0xff) -#define PUTCHAR(a,p,c) ((a)[(p) / 4] = (((a)[(p) / 4] & ~(0xff << (((p) & 3) * 8))) | ((c) << (((p) & 3) * 8)))) +#define GETCHAR(a,p) ((u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) #define SETSHIFTEDINT(a,n,v) \ { \ diff --git a/OpenCL/m07701_a3-optimized.cl b/OpenCL/m07701_a3-optimized.cl index 506ca491f..4b0aa394e 100644 --- a/OpenCL/m07701_a3-optimized.cl +++ b/OpenCL/m07701_a3-optimized.cl @@ -15,8 +15,8 @@ #include "inc_hash_md5.cl" #endif -#define GETCHAR(a,p) (((a)[(p) / 4] >> (((p) & 3) * 8)) & 0xff) -#define PUTCHAR(a,p,c) ((a)[(p) / 4] = (((a)[(p) / 4] & ~(0xff << (((p) & 3) * 8))) | ((c) << (((p) & 3) * 8)))) +#define GETCHAR(a,p) ((u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) CONSTANT_VK u32a sapb_trans_tbl[256] = {