From 3a5544a55453df38ae26fc5b1a159103cb35cc42 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Tue, 21 Jan 2020 22:09:56 +0100 Subject: [PATCH] Help some compiler with 64 bit constants --- OpenCL/inc_common.cl | 16 ++++++++-------- OpenCL/inc_vendor.h | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/OpenCL/inc_common.cl b/OpenCL/inc_common.cl index 2d086c4b6..cb6f9a534 100644 --- a/OpenCL/inc_common.cl +++ b/OpenCL/inc_common.cl @@ -812,14 +812,14 @@ DECLSPEC u64 hc_swap64_S (const u64 v) #ifdef USE_SWIZZLE r = as_ulong (as_uchar8 (v).s76543210); #else - r = ((v & 0xff00000000000000ULL) >> 56) - | ((v & 0x00ff000000000000ULL) >> 40) - | ((v & 0x0000ff0000000000ULL) >> 24) - | ((v & 0x000000ff00000000ULL) >> 8) - | ((v & 0x00000000ff000000ULL) << 8) - | ((v & 0x0000000000ff0000ULL) << 24) - | ((v & 0x000000000000ff00ULL) << 40) - | ((v & 0x00000000000000ffULL) << 56); + r = ((v & (u64) 0xff00000000000000ULL) >> 56) + | ((v & (u64) 0x00ff000000000000ULL) >> 40) + | ((v & (u64) 0x0000ff0000000000ULL) >> 24) + | ((v & (u64) 0x000000ff00000000ULL) >> 8) + | ((v & (u64) 0x00000000ff000000ULL) << 8) + | ((v & (u64) 0x0000000000ff0000ULL) << 24) + | ((v & (u64) 0x000000000000ff00ULL) << 40) + | ((v & (u64) 0x00000000000000ffULL) << 56); #endif #endif #endif diff --git a/OpenCL/inc_vendor.h b/OpenCL/inc_vendor.h index c2238a838..6924fd37c 100644 --- a/OpenCL/inc_vendor.h +++ b/OpenCL/inc_vendor.h @@ -153,9 +153,9 @@ #endif #ifdef IS_OPENCL -#define USE_BITSELECT -#define USE_ROTATE -#define USE_SWIZZLE +//#define USE_BITSELECT +//#define USE_ROTATE +//#define USE_SWIZZLE #endif #endif