From ad508830800418112ce4708c16ab556d50f70d02 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Sun, 18 Feb 2018 11:28:25 +0100 Subject: [PATCH] Allow unroll for DES based algorithms but not bitsliced versions --- OpenCL/inc_vendor.cl | 10 ---------- OpenCL/m01500_a3.cl | 28 +++++++++++++--------------- OpenCL/m03000_a3.cl | 1 + OpenCL/m14000_a3.cl | 1 + 4 files changed, 15 insertions(+), 25 deletions(-) diff --git a/OpenCL/inc_vendor.cl b/OpenCL/inc_vendor.cl index 963fe7eb4..cbaa063d4 100644 --- a/OpenCL/inc_vendor.cl +++ b/OpenCL/inc_vendor.cl @@ -192,16 +192,6 @@ #ifdef IS_NV #ifdef IS_GPU -#if KERN_TYPE == 1500 -#undef _unroll -#endif -#if KERN_TYPE == 3000 -#undef _unroll -#endif -#if KERN_TYPE == 14000 -#undef _unroll -#endif - #endif #endif diff --git a/OpenCL/m01500_a3.cl b/OpenCL/m01500_a3.cl index 3a812046d..ba4594db8 100644 --- a/OpenCL/m01500_a3.cl +++ b/OpenCL/m01500_a3.cl @@ -15,18 +15,16 @@ #define COMPARE_M "inc_comp_multi_bs.cl" #ifdef IS_NV +#undef _unroll #define KXX_DECL -#define sXXX_DECL #endif #ifdef IS_AMD #define KXX_DECL -#define sXXX_DECL #endif #ifdef IS_GENERIC #define KXX_DECL -#define sXXX_DECL #endif #ifdef IS_NV @@ -1538,18 +1536,18 @@ DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const DECLSPEC void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, u32 *D00, u32 *D01, u32 *D02, u32 *D03, u32 *D04, u32 *D05, u32 *D06, u32 *D07, u32 *D08, u32 *D09, u32 *D10, u32 *D11, u32 *D12, u32 *D13, u32 *D14, u32 *D15, u32 *D16, u32 *D17, u32 *D18, u32 *D19, u32 *D20, u32 *D21, u32 *D22, u32 *D23, u32 *D24, u32 *D25, u32 *D26, u32 *D27, u32 *D28, u32 *D29, u32 *D30, u32 *D31, u32 *D32, u32 *D33, u32 *D34, u32 *D35, u32 *D36, u32 *D37, u32 *D38, u32 *D39, u32 *D40, u32 *D41, u32 *D42, u32 *D43, u32 *D44, u32 *D45, u32 *D46, u32 *D47, u32 *D48, u32 *D49, u32 *D50, u32 *D51, u32 *D52, u32 *D53, u32 *D54, u32 *D55, u32 *D56, u32 *D57, u32 *D58, u32 *D59, u32 *D60, u32 *D61, u32 *D62, u32 *D63) { - sXXX_DECL u32 s001 = (0x001 & DESCRYPT_SALT) ? 1 : 0; - sXXX_DECL u32 s002 = (0x002 & DESCRYPT_SALT) ? 1 : 0; - sXXX_DECL u32 s004 = (0x004 & DESCRYPT_SALT) ? 1 : 0; - sXXX_DECL u32 s008 = (0x008 & DESCRYPT_SALT) ? 1 : 0; - sXXX_DECL u32 s010 = (0x010 & DESCRYPT_SALT) ? 1 : 0; - sXXX_DECL u32 s020 = (0x020 & DESCRYPT_SALT) ? 1 : 0; - sXXX_DECL u32 s040 = (0x040 & DESCRYPT_SALT) ? 1 : 0; - sXXX_DECL u32 s080 = (0x080 & DESCRYPT_SALT) ? 1 : 0; - sXXX_DECL u32 s100 = (0x100 & DESCRYPT_SALT) ? 1 : 0; - sXXX_DECL u32 s200 = (0x200 & DESCRYPT_SALT) ? 1 : 0; - sXXX_DECL u32 s400 = (0x400 & DESCRYPT_SALT) ? 1 : 0; - sXXX_DECL u32 s800 = (0x800 & DESCRYPT_SALT) ? 1 : 0; + const u32 s001 = (0x001 & DESCRYPT_SALT) ? 1 : 0; + const u32 s002 = (0x002 & DESCRYPT_SALT) ? 1 : 0; + const u32 s004 = (0x004 & DESCRYPT_SALT) ? 1 : 0; + const u32 s008 = (0x008 & DESCRYPT_SALT) ? 1 : 0; + const u32 s010 = (0x010 & DESCRYPT_SALT) ? 1 : 0; + const u32 s020 = (0x020 & DESCRYPT_SALT) ? 1 : 0; + const u32 s040 = (0x040 & DESCRYPT_SALT) ? 1 : 0; + const u32 s080 = (0x080 & DESCRYPT_SALT) ? 1 : 0; + const u32 s100 = (0x100 & DESCRYPT_SALT) ? 1 : 0; + const u32 s200 = (0x200 & DESCRYPT_SALT) ? 1 : 0; + const u32 s400 = (0x400 & DESCRYPT_SALT) ? 1 : 0; + const u32 s800 = (0x800 & DESCRYPT_SALT) ? 1 : 0; KXX_DECL u32 k00, k01, k02, k03, k04, k05; KXX_DECL u32 k06, k07, k08, k09, k10, k11; diff --git a/OpenCL/m03000_a3.cl b/OpenCL/m03000_a3.cl index 7354e2d5a..259a776d1 100644 --- a/OpenCL/m03000_a3.cl +++ b/OpenCL/m03000_a3.cl @@ -15,6 +15,7 @@ #define COMPARE_M "inc_comp_multi_bs.cl" #ifdef IS_NV +#undef _unroll #define KXX_DECL #endif diff --git a/OpenCL/m14000_a3.cl b/OpenCL/m14000_a3.cl index f44a6a9c4..8102d641e 100644 --- a/OpenCL/m14000_a3.cl +++ b/OpenCL/m14000_a3.cl @@ -15,6 +15,7 @@ #define COMPARE_M "inc_comp_multi_bs.cl" #ifdef IS_NV +#undef _unroll #define KXX_DECL #endif