From bacc1049e3152771d306d97ce858f05d4024d331 Mon Sep 17 00:00:00 2001 From: jsteube Date: Tue, 5 Jan 2016 23:05:06 +0100 Subject: [PATCH] More fixes for IS_UNKNOWN in kernels --- OpenCL/amp_a1.cl | 2 +- OpenCL/common.c | 8 ++++---- OpenCL/m01600.cl | 6 +++--- OpenCL/m05800.cl | 2 +- OpenCL/m06300.cl | 6 +++--- OpenCL/m07400.cl | 8 ++++---- OpenCL/m10700.cl | 4 ++-- OpenCL/m11400_a0.cl | 2 +- OpenCL/m11400_a1.cl | 2 +- OpenCL/m11400_a3.cl | 2 +- OpenCL/m11600.cl | 4 ++-- OpenCL/rp.c | 24 ++++++++++++------------ 12 files changed, 35 insertions(+), 35 deletions(-) diff --git a/OpenCL/amp_a1.cl b/OpenCL/amp_a1.cl index edebe1e..69b9898 100644 --- a/OpenCL/amp_a1.cl +++ b/OpenCL/amp_a1.cl @@ -9,7 +9,7 @@ static void switch_buffer_by_offset (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 offset) { - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_mod_4 = offset & 3; const int offset_minus_4 = 4 - offset; diff --git a/OpenCL/common.c b/OpenCL/common.c index fcbc56c..960dfed 100644 --- a/OpenCL/common.c +++ b/OpenCL/common.c @@ -144,7 +144,7 @@ static void make_unicode (const u32 in[4], u32 out1[4], u32 out2[4]) out1[0] = __byte_perm (in[0], 0, 0x7170); #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN out2[3] = ((in[3] >> 8) & 0x00FF0000) | ((in[3] >> 16) & 0x000000FF); out2[2] = ((in[3] << 8) & 0x00FF0000) | ((in[3] >> 0) & 0x000000FF); out2[1] = ((in[2] >> 8) & 0x00FF0000) | ((in[2] >> 16) & 0x000000FF); @@ -165,7 +165,7 @@ static void undo_unicode (const u32 in1[4], const u32 in2[4], u32 out[4]) out[3] = __byte_perm (in2[2], in2[3], 0x6420); #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN out[0] = ((in1[0] & 0x000000ff) >> 0) | ((in1[0] & 0x00ff0000) >> 8) | ((in1[1] & 0x000000ff) << 16) | ((in1[1] & 0x00ff0000) << 8); out[1] = ((in1[2] & 0x000000ff) >> 0) | ((in1[2] & 0x00ff0000) >> 8) @@ -3987,7 +3987,7 @@ static void append_0x80_1x16 (u32 w[16], const u32 offset) static void switch_buffer_by_offset (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 offset) { - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_mod_4 = offset & 3; const int offset_minus_4 = 4 - offset; @@ -4701,7 +4701,7 @@ static void switch_buffer_by_offset (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], static void switch_buffer_by_offset_be (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 offset) { - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN switch (offset / 4) { case 0: diff --git a/OpenCL/m01600.cl b/OpenCL/m01600.cl index 3c69a25..3639676 100644 --- a/OpenCL/m01600.cl +++ b/OpenCL/m01600.cl @@ -131,7 +131,7 @@ static void memcat16 (u32 block0[4], u32 block1[4], u32 block2[4], u32 block3[4] u32 tmp3; u32 tmp4; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - (block_len & 3); @@ -243,7 +243,7 @@ static void memcat16_x80 (u32 block0[4], u32 block1[4], u32 block2[4], u32 block u32 tmp3; u32 tmp4; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - (block_len & 3); @@ -353,7 +353,7 @@ static void memcat8 (u32 block0[4], u32 block1[4], u32 block2[4], u32 block3[4], u32 tmp1; u32 tmp2; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - (block_len & 3); diff --git a/OpenCL/m05800.cl b/OpenCL/m05800.cl index 5e70427..e6f90f6 100644 --- a/OpenCL/m05800.cl +++ b/OpenCL/m05800.cl @@ -1098,7 +1098,7 @@ static void append_salt (u32 w0[4], u32 w1[4], u32 w2[4], const u32 append[5], c u32 tmp4; u32 tmp5; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - (offset & 3); diff --git a/OpenCL/m06300.cl b/OpenCL/m06300.cl index 8dd8c86..f7bb552 100644 --- a/OpenCL/m06300.cl +++ b/OpenCL/m06300.cl @@ -128,7 +128,7 @@ static void memcat16 (u32 block0[4], u32 block1[4], u32 block2[4], u32 block3[4] u32 tmp3; u32 tmp4; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - (block_len & 3); @@ -240,7 +240,7 @@ static void memcat16_x80 (u32 block0[4], u32 block1[4], u32 block2[4], u32 block u32 tmp3; u32 tmp4; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - (block_len & 3); @@ -350,7 +350,7 @@ static void memcat8 (u32 block0[4], u32 block1[4], u32 block2[4], u32 block3[4], u32 tmp1; u32 tmp2; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - (block_len & 3); diff --git a/OpenCL/m07400.cl b/OpenCL/m07400.cl index 8d3191e..b11c893 100644 --- a/OpenCL/m07400.cl +++ b/OpenCL/m07400.cl @@ -205,7 +205,7 @@ static u32 memcat16 (u32 block[16], const u32 block_len, const u32 append[4], co u32 tmp3; u32 tmp4; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - block_len; tmp0 = amd_bytealign (append[0], 0, offset_minus_4); @@ -342,7 +342,7 @@ static u32 memcat16c (u32 block[16], const u32 block_len, const u32 append[4], c u32 tmp3; u32 tmp4; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - block_len; tmp0 = amd_bytealign (append[0], 0, offset_minus_4); @@ -505,7 +505,7 @@ static u32 memcat20 (u32 block[20], const u32 block_len, const u32 append[4], co u32 tmp3; u32 tmp4; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - block_len; tmp0 = amd_bytealign (append[0], 0, offset_minus_4); @@ -650,7 +650,7 @@ static u32 memcat20_x80 (u32 block[20], const u32 block_len, const u32 append[4] u32 tmp3; u32 tmp4; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - block_len; tmp0 = amd_bytealign (append[0], 0, offset_minus_4); diff --git a/OpenCL/m10700.cl b/OpenCL/m10700.cl index 6b436cf..20c6f4b 100644 --- a/OpenCL/m10700.cl +++ b/OpenCL/m10700.cl @@ -1198,7 +1198,7 @@ static void make_sc (u32 *sc, const u32 *pw, const u32 pw_len, const u32 *bl, co u32 i; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN for (i = 0; i < pd; i++) sc[idx++] = pw[i]; sc[idx++] = pw[i] | amd_bytealign (bl[0], 0, pm4); @@ -1229,7 +1229,7 @@ static void make_pt_with_offset (u32 *pt, const u32 offset, const u32 *sc, const const u32 om = m % 4; const u32 od = m / 4; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN pt[0] = amd_bytealign (sc[od + 1], sc[od + 0], om); pt[1] = amd_bytealign (sc[od + 2], sc[od + 1], om); pt[2] = amd_bytealign (sc[od + 3], sc[od + 2], om); diff --git a/OpenCL/m11400_a0.cl b/OpenCL/m11400_a0.cl index 7833a4c..bc22b0d 100644 --- a/OpenCL/m11400_a0.cl +++ b/OpenCL/m11400_a0.cl @@ -29,7 +29,7 @@ static u32 memcat32 (u32 block0[16], u32 block1[16], const u32 block_len, const const u32 mod = block_len & 3; const u32 div = block_len / 4; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - mod; u32 append0_t[4]; diff --git a/OpenCL/m11400_a1.cl b/OpenCL/m11400_a1.cl index 92edea6..5ddc227 100644 --- a/OpenCL/m11400_a1.cl +++ b/OpenCL/m11400_a1.cl @@ -27,7 +27,7 @@ static u32 memcat32 (u32 block0[16], u32 block1[16], const u32 block_len, const const u32 mod = block_len & 3; const u32 div = block_len / 4; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - mod; u32 append0_t[4]; diff --git a/OpenCL/m11400_a3.cl b/OpenCL/m11400_a3.cl index 46df53d..5d2d54f 100644 --- a/OpenCL/m11400_a3.cl +++ b/OpenCL/m11400_a3.cl @@ -27,7 +27,7 @@ static u32 memcat32 (u32 block0[16], u32 block1[16], const u32 block_len, const const u32 mod = block_len & 3; const u32 div = block_len / 4; - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - mod; u32 append0_t[4]; diff --git a/OpenCL/m11600.cl b/OpenCL/m11600.cl index 5d64a77..b490ea5 100644 --- a/OpenCL/m11600.cl +++ b/OpenCL/m11600.cl @@ -1139,7 +1139,7 @@ static u32 memcat8c (u32 block[16], const u32 block_len, const u32 append[2], co tmp2 = __byte_perm (append[1], 0, selector); #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - block_len; tmp0 = amd_bytealign (append[0], 0, offset_minus_4); @@ -1272,7 +1272,7 @@ static u32 memcat32c (u32 block[16], const u32 block_len, const u32 append[8], c tmp8 = __byte_perm (append[7], 0, selector); #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const int offset_minus_4 = 4 - block_len; tmp0 = amd_bytealign (append[0], 0, offset_minus_4); diff --git a/OpenCL/rp.c b/OpenCL/rp.c index 8782240..be9e307 100644 --- a/OpenCL/rp.c +++ b/OpenCL/rp.c @@ -133,7 +133,7 @@ static void lshift_block (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 o out1[3] = __byte_perm (in1[3], 0, 0x4321); #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN out0[0] = amd_bytealign (in0[1], in0[0], 1); out0[1] = amd_bytealign (in0[2], in0[1], 1); out0[2] = amd_bytealign (in0[3], in0[2], 1); @@ -158,7 +158,7 @@ static void rshift_block (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 o out0[0] = __byte_perm ( 0, in0[0], 0x6543); #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN out1[3] = amd_bytealign (in1[3], in1[2], 3); out1[2] = amd_bytealign (in1[2], in1[1], 3); out1[1] = amd_bytealign (in1[1], in1[0], 3); @@ -466,7 +466,7 @@ static void lshift_block_N (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 } #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN switch (num) { case 0: out0[0] = in0[0]; @@ -1058,7 +1058,7 @@ static void rshift_block_N (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 } #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN switch (num) { case 0: out1[3] = in1[3]; @@ -1648,7 +1648,7 @@ static void append_block8 (const u32 offset, u32 dst0[4], u32 dst1[4], const u32 } #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN switch (offset) { case 0: @@ -2578,7 +2578,7 @@ static u32 rule_op_mangle_replace (const u32 p0, const u32 p1, u32 buf0[4], u32 } #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN const uchar4 tmp0 = (uchar4) (p0); const uchar4 tmp1 = (uchar4) (p1); @@ -2793,7 +2793,7 @@ static u32 rule_op_mangle_dupechar_first (const u32 p0, const u32 p1, u32 buf0[4 } #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN switch (p0) { case 1: buf0[0] |= tmp << 0; @@ -3036,7 +3036,7 @@ static u32 rule_op_mangle_dupechar_all (const u32 p0, const u32 p1, u32 buf0[4], buf1[3] = tib41[3]; #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN tib40[0] = ((buf0[0] & 0x000000FF) << 0) | ((buf0[0] & 0x0000FF00) << 8); tib40[1] = ((buf0[0] & 0x00FF0000) >> 16) | ((buf0[0] & 0xFF000000) >> 8); tib40[2] = ((buf0[1] & 0x000000FF) << 0) | ((buf0[1] & 0x0000FF00) << 8); @@ -3069,7 +3069,7 @@ static u32 rule_op_mangle_switch_first (const u32 p0, const u32 p1, u32 buf0[4], buf0[0] = __byte_perm (buf0[0], 0, 0x3201); #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN buf0[0] = (buf0[0] & 0xFFFF0000) | ((buf0[0] << 8) & 0x0000FF00) | ((buf0[0] >> 8) & 0x000000FF); #endif @@ -3160,7 +3160,7 @@ static u32 rule_op_mangle_switch_last (const u32 p0, const u32 p1, u32 buf0[4], } #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN switch (in_len) { case 2: buf0[0] = ((buf0[0] << 8) & 0x0000FF00) | ((buf0[0] >> 8) & 0x000000FF); @@ -3489,7 +3489,7 @@ static u32 rule_op_mangle_switch_at (const u32 p0, const u32 p1, u32 buf0[4], u3 } #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN switch (p0) { case 0: tmp0 = (buf0[0] >> 0) & 0xFF; @@ -4065,7 +4065,7 @@ static u32 rule_op_mangle_title (const u32 p0, const u32 p1, u32 buf0[4], u32 bu } #endif - #ifdef IS_AMD + #if defined IS_AMD || defined IS_UNKNOWN u32 tib40[4]; u32 tib41[4]; -- 2.25.1