From c0ff31406c7d7fcbd797a621eb9fd3c2346ae1e4 Mon Sep 17 00:00:00 2001 From: Tony Butler Date: Sat, 27 Nov 2021 10:58:11 -0700 Subject: [PATCH] Rearrange Panthera --- src/backend/opencl/cl/cn/algorithm.cl | 3 +-- src/backend/opencl/cl/cn/cryptonight_cl.h | 18 +++++++++--------- src/backend/opencl/cl/rx/randomx_cl.h | 18 +++++++++--------- src/base/crypto/Algorithm.cpp | 10 ++-------- 4 files changed, 21 insertions(+), 28 deletions(-) diff --git a/src/backend/opencl/cl/cn/algorithm.cl b/src/backend/opencl/cl/cn/algorithm.cl index ae686f8f24..bbb263f1f5 100644 --- a/src/backend/opencl/cl/cn/algorithm.cl +++ b/src/backend/opencl/cl/cn/algorithm.cl @@ -23,6 +23,7 @@ #define ALGO_RX_WOW 0x72141177 #define ALGO_RX_ARQ 0x72121061 #define ALGO_RX_XEQ 0x72121000 +#define ALGO_RX_XLA 0x721211ff #define ALGO_RX_SFX 0x72151273 #define ALGO_RX_GRAFT 0x72151267 #define ALGO_RX_YADA 0x72151279 @@ -31,8 +32,6 @@ #define ALGO_AR2_WRKZ 0x61120000 #define ALGO_KAWPOW_RVN 0x6b0f0000 -#define ALGO_RX_XLA 0x721211ff - #define FAMILY_UNKNOWN 0 #define FAMILY_CN 0x63150000 #define FAMILY_CN_LITE 0x63140000 diff --git a/src/backend/opencl/cl/cn/cryptonight_cl.h b/src/backend/opencl/cl/cn/cryptonight_cl.h index 9a662ccf0d..56c01a1274 100644 --- a/src/backend/opencl/cl/cn/cryptonight_cl.h +++ b/src/backend/opencl/cl/cn/cryptonight_cl.h @@ -35,15 +35,15 @@ static const char cryptonight_cl[61538] = { 0x35,0x31,0x32,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x57,0x4f,0x57,0x20,0x30,0x78,0x37,0x32,0x31,0x34, 0x31,0x31,0x37,0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x41,0x52,0x51,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31, 0x30,0x36,0x31,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x58,0x45,0x51,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,0x30, - 0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x53,0x46,0x58,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x37, - 0x33,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x47,0x52,0x41,0x46,0x54,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32, - 0x36,0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x59,0x41,0x44,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32, - 0x37,0x39,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x20,0x30,0x78,0x36,0x31,0x31, - 0x33,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x5f,0x56,0x32, - 0x20,0x30,0x78,0x36,0x31,0x31,0x34,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x57,0x52,0x4b, - 0x5a,0x20,0x30,0x78,0x36,0x31,0x31,0x32,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x4b,0x41,0x57,0x50,0x4f,0x57, - 0x5f,0x52,0x56,0x4e,0x20,0x30,0x78,0x36,0x62,0x30,0x66,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f, - 0x58,0x4c,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,0x31,0x66,0x66,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x55,0x4e, + 0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x58,0x4c,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,0x31,0x66, + 0x66,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x53,0x46,0x58,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x37,0x33, + 0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x47,0x52,0x41,0x46,0x54,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x36, + 0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x59,0x41,0x44,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x37, + 0x39,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x20,0x30,0x78,0x36,0x31,0x31,0x33, + 0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x5f,0x56,0x32,0x20, + 0x30,0x78,0x36,0x31,0x31,0x34,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x57,0x52,0x4b,0x5a, + 0x20,0x30,0x78,0x36,0x31,0x31,0x32,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x4b,0x41,0x57,0x50,0x4f,0x57,0x5f, + 0x52,0x56,0x4e,0x20,0x30,0x78,0x36,0x62,0x30,0x66,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x55,0x4e, 0x4b,0x4e,0x4f,0x57,0x4e,0x20,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x20,0x30,0x78,0x36,0x33,0x31,0x35, 0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x5f,0x4c,0x49,0x54,0x45,0x20,0x30,0x78,0x36,0x33, 0x31,0x34,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x5f,0x48,0x45,0x41,0x56,0x59,0x20,0x30, diff --git a/src/backend/opencl/cl/rx/randomx_cl.h b/src/backend/opencl/cl/rx/randomx_cl.h index c6a8bf93af..e107406026 100644 --- a/src/backend/opencl/cl/rx/randomx_cl.h +++ b/src/backend/opencl/cl/rx/randomx_cl.h @@ -28,15 +28,15 @@ static const char randomx_cl[137840] = { 0x31,0x32,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x57,0x4f,0x57,0x20,0x30,0x78,0x37,0x32,0x31,0x34,0x31, 0x31,0x37,0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x41,0x52,0x51,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,0x30, 0x36,0x31,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x58,0x45,0x51,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,0x30,0x30, - 0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x53,0x46,0x58,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x37,0x33, - 0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x47,0x52,0x41,0x46,0x54,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x36, - 0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x59,0x41,0x44,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x37, - 0x39,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x20,0x30,0x78,0x36,0x31,0x31,0x33, - 0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x5f,0x56,0x32,0x20, - 0x30,0x78,0x36,0x31,0x31,0x34,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x57,0x52,0x4b,0x5a, - 0x20,0x30,0x78,0x36,0x31,0x31,0x32,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x4b,0x41,0x57,0x50,0x4f,0x57,0x5f, - 0x52,0x56,0x4e,0x20,0x30,0x78,0x36,0x62,0x30,0x66,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x58, - 0x4c,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,0x31,0x66,0x66,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x55,0x4e,0x4b, + 0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x58,0x4c,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,0x31,0x66,0x66, + 0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x53,0x46,0x58,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x37,0x33,0x0a, + 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x47,0x52,0x41,0x46,0x54,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x36,0x37, + 0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x59,0x41,0x44,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x37,0x39, + 0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x20,0x30,0x78,0x36,0x31,0x31,0x33,0x30, + 0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x5f,0x56,0x32,0x20,0x30, + 0x78,0x36,0x31,0x31,0x34,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x57,0x52,0x4b,0x5a,0x20, + 0x30,0x78,0x36,0x31,0x31,0x32,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x4b,0x41,0x57,0x50,0x4f,0x57,0x5f,0x52, + 0x56,0x4e,0x20,0x30,0x78,0x36,0x62,0x30,0x66,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x55,0x4e,0x4b, 0x4e,0x4f,0x57,0x4e,0x20,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x20,0x30,0x78,0x36,0x33,0x31,0x35,0x30, 0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x5f,0x4c,0x49,0x54,0x45,0x20,0x30,0x78,0x36,0x33,0x31, 0x34,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x5f,0x48,0x45,0x41,0x56,0x59,0x20,0x30,0x78, diff --git a/src/base/crypto/Algorithm.cpp b/src/base/crypto/Algorithm.cpp index 48523186bc..7d4361ffa4 100644 --- a/src/base/crypto/Algorithm.cpp +++ b/src/base/crypto/Algorithm.cpp @@ -84,6 +84,7 @@ const char *Algorithm::kRX_0 = "rx/0"; const char *Algorithm::kRX_WOW = "rx/wow"; const char *Algorithm::kRX_ARQ = "rx/arq"; const char *Algorithm::kRX_XEQ = "rx/xeq"; +const char *Algorithm::kRX_XLA = "panthera"; const char *Algorithm::kRX_GRAFT = "rx/graft"; const char *Algorithm::kRX_SFX = "rx/sfx"; const char *Algorithm::kRX_KEVA = "rx/keva"; @@ -109,10 +110,6 @@ const char* Algorithm::kFLEX = "flex"; const char* Algorithm::kFLEX_KCN = "flex"; #endif -#ifdef XMRIG_ALGO_RANDOMX -const char *Algorithm::kRX_XLA = "panthera"; -#endif - #define ALGO_NAME(ALGO) { Algorithm::ALGO, Algorithm::k##ALGO } #define ALGO_ALIAS(ALGO, NAME) { NAME, Algorithm::ALGO } @@ -287,6 +284,7 @@ static const std::map kAlgorithmAlias ALGO_ALIAS(RX_ARQ, "randomarq"), ALGO_ALIAS_AUTO(RX_XEQ), ALGO_ALIAS(RX_XEQ, "randomx/xeq"), ALGO_ALIAS(RX_XEQ, "randomxeq"), + ALGO_ALIAS_AUTO(RX_XLA), ALGO_ALIAS(RX_XLA, "Panthera"), ALGO_ALIAS_AUTO(RX_GRAFT), ALGO_ALIAS(RX_GRAFT, "randomx/graft"), ALGO_ALIAS(RX_GRAFT, "randomgraft"), ALGO_ALIAS_AUTO(RX_SFX), ALGO_ALIAS(RX_SFX, "randomx/sfx"), @@ -307,10 +305,6 @@ static const std::map kAlgorithmAlias ALGO_ALIAS_AUTO(KAWPOW_RVN), ALGO_ALIAS(KAWPOW_RVN, "kawpow/rvn"), # endif -# ifdef XMRIG_ALGO_RANDOMX - ALGO_ALIAS_AUTO(RX_XLA), ALGO_ALIAS(RX_XLA, "Panthera"), -# endif - # ifdef XMRIG_ALGO_GHOSTRIDER ALGO_ALIAS_AUTO(GHOSTRIDER_RTM), ALGO_ALIAS(GHOSTRIDER_RTM, "ghostrider/rtm"), ALGO_ALIAS(GHOSTRIDER_RTM, "gr"),