mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-23 03:59:41 +00:00
Added "cn-pico/tlo".
This commit is contained in:
parent
ac4086b273
commit
402c44b547
10 changed files with 5700 additions and 5630 deletions
|
@ -154,7 +154,8 @@ bool xmrig::CpuWorker<N>::selfTest()
|
|||
|
||||
# ifdef XMRIG_ALGO_CN_PICO
|
||||
if (m_algorithm.family() == Algorithm::CN_PICO) {
|
||||
return verify(Algorithm::CN_PICO_0, test_output_pico_trtl);
|
||||
return verify(Algorithm::CN_PICO_0, test_output_pico_trtl) &&
|
||||
verify(Algorithm::CN_PICO_TLO, test_output_pico_tlo);
|
||||
}
|
||||
# endif
|
||||
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
#define ALGO_CN_HEAVY_TUBE 15
|
||||
#define ALGO_CN_HEAVY_XHV 16
|
||||
#define ALGO_CN_PICO_0 17
|
||||
#define ALGO_RX_0 18
|
||||
#define ALGO_RX_WOW 19
|
||||
#define ALGO_RX_LOKI 20
|
||||
#define ALGO_RX_ARQMA 21
|
||||
#define ALGO_RX_SFX 22
|
||||
#define ALGO_RX_V 23
|
||||
#define ALGO_CN_PICO_TLO 18
|
||||
#define ALGO_RX_0 19
|
||||
#define ALGO_RX_WOW 20
|
||||
#define ALGO_RX_LOKI 21
|
||||
#define ALGO_RX_ARQMA 22
|
||||
#define ALGO_RX_SFX 23
|
||||
#define ALGO_AR2_CHUKWA 24
|
||||
#define ALGO_AR2_WRKZ 25
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -111,6 +111,7 @@ public:
|
|||
|
||||
# ifdef XMRIG_ALGO_CN_PICO
|
||||
case Algorithm::CN_PICO_0:
|
||||
case Algorithm::CN_PICO_TLO:
|
||||
return CN_ITER / 8;
|
||||
# endif
|
||||
|
||||
|
@ -171,6 +172,7 @@ public:
|
|||
case Algorithm::CN_DOUBLE:
|
||||
# ifdef XMRIG_ALGO_CN_PICO
|
||||
case Algorithm::CN_PICO_0:
|
||||
case Algorithm::CN_PICO_TLO:
|
||||
# endif
|
||||
return Algorithm::CN_2;
|
||||
|
||||
|
@ -217,6 +219,7 @@ template<> constexpr inline uint32_t CnAlgo<Algorithm::CN_RWZ>::iterations() con
|
|||
template<> constexpr inline uint32_t CnAlgo<Algorithm::CN_ZLS>::iterations() const { return 0x60000; }
|
||||
template<> constexpr inline uint32_t CnAlgo<Algorithm::CN_GPU>::iterations() const { return 0xC000; }
|
||||
template<> constexpr inline uint32_t CnAlgo<Algorithm::CN_PICO_0>::iterations() const { return CN_ITER / 8; }
|
||||
template<> constexpr inline uint32_t CnAlgo<Algorithm::CN_PICO_TLO>::iterations() const { return CN_ITER / 8; }
|
||||
|
||||
|
||||
template<> constexpr inline size_t CnAlgo<Algorithm::CN_LITE_0>::memory() const { return CN_MEMORY / 2; }
|
||||
|
@ -225,6 +228,7 @@ template<> constexpr inline size_t CnAlgo<Algorithm::CN_HEAVY_0>::memory() const
|
|||
template<> constexpr inline size_t CnAlgo<Algorithm::CN_HEAVY_TUBE>::memory() const { return CN_MEMORY * 2; }
|
||||
template<> constexpr inline size_t CnAlgo<Algorithm::CN_HEAVY_XHV>::memory() const { return CN_MEMORY * 2; }
|
||||
template<> constexpr inline size_t CnAlgo<Algorithm::CN_PICO_0>::memory() const { return CN_MEMORY / 8; }
|
||||
template<> constexpr inline size_t CnAlgo<Algorithm::CN_PICO_TLO>::memory() const { return CN_MEMORY / 8; }
|
||||
|
||||
|
||||
template<> constexpr inline uint32_t CnAlgo<Algorithm::CN_GPU>::mask() const { return 0x1FFFC0; }
|
||||
|
|
|
@ -79,6 +79,11 @@ cn_mainloop_fun cn_trtl_mainloop_ryzen_asm = nullptr;
|
|||
cn_mainloop_fun cn_trtl_mainloop_bulldozer_asm = nullptr;
|
||||
cn_mainloop_fun cn_trtl_double_mainloop_sandybridge_asm = nullptr;
|
||||
|
||||
cn_mainloop_fun cn_tlo_mainloop_ivybridge_asm = nullptr;
|
||||
cn_mainloop_fun cn_tlo_mainloop_ryzen_asm = nullptr;
|
||||
cn_mainloop_fun cn_tlo_mainloop_bulldozer_asm = nullptr;
|
||||
cn_mainloop_fun cn_tlo_double_mainloop_sandybridge_asm = nullptr;
|
||||
|
||||
cn_mainloop_fun cn_zls_mainloop_ivybridge_asm = nullptr;
|
||||
cn_mainloop_fun cn_zls_mainloop_ryzen_asm = nullptr;
|
||||
cn_mainloop_fun cn_zls_mainloop_bulldozer_asm = nullptr;
|
||||
|
@ -128,7 +133,7 @@ static void patchCode(T dst, U src, const uint32_t iterations, const uint32_t ma
|
|||
|
||||
static void patchAsmVariants()
|
||||
{
|
||||
const int allocation_size = 65536;
|
||||
const int allocation_size = 81920;
|
||||
auto base = static_cast<uint8_t *>(VirtualMemory::allocateExecutableMemory(allocation_size));
|
||||
|
||||
cn_half_mainloop_ivybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x0000);
|
||||
|
@ -153,6 +158,13 @@ static void patchAsmVariants()
|
|||
cn_double_mainloop_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xE000);
|
||||
cn_double_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xF000);
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_PICO
|
||||
cn_tlo_mainloop_ivybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x10000);
|
||||
cn_tlo_mainloop_ryzen_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x11000);
|
||||
cn_tlo_mainloop_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x12000);
|
||||
cn_tlo_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x13000);
|
||||
# endif
|
||||
|
||||
{
|
||||
constexpr uint32_t ITER = CnAlgo<Algorithm::CN_HALF>().iterations();
|
||||
|
||||
|
@ -172,6 +184,16 @@ static void patchAsmVariants()
|
|||
patchCode(cn_trtl_mainloop_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER, MASK);
|
||||
patchCode(cn_trtl_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER, MASK);
|
||||
}
|
||||
|
||||
{
|
||||
constexpr uint32_t ITER = CnAlgo<Algorithm::CN_PICO_TLO>().iterations();
|
||||
constexpr uint32_t MASK = CnAlgo<Algorithm::CN_PICO_TLO>().mask();
|
||||
|
||||
patchCode(cn_tlo_mainloop_ivybridge_asm, cnv2_mainloop_ivybridge_asm, ITER, MASK);
|
||||
patchCode(cn_tlo_mainloop_ryzen_asm, cnv2_mainloop_ryzen_asm, ITER, MASK);
|
||||
patchCode(cn_tlo_mainloop_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER, MASK);
|
||||
patchCode(cn_tlo_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER, MASK);
|
||||
}
|
||||
# endif
|
||||
|
||||
{
|
||||
|
@ -244,6 +266,8 @@ xmrig::CnHash::CnHash()
|
|||
# ifdef XMRIG_ALGO_CN_PICO
|
||||
ADD_FN(Algorithm::CN_PICO_0);
|
||||
ADD_FN_ASM(Algorithm::CN_PICO_0);
|
||||
ADD_FN(Algorithm::CN_PICO_TLO);
|
||||
ADD_FN_ASM(Algorithm::CN_PICO_TLO);
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_ARGON2
|
||||
|
|
|
@ -338,6 +338,21 @@ const static uint8_t test_output_pico_trtl[160] = {
|
|||
0xA1, 0xE7, 0x53, 0x85, 0xFB, 0x72, 0xDD, 0x75, 0x90, 0x39, 0xB2, 0x3D, 0xC3, 0x08, 0x2C, 0xD5,
|
||||
0x01, 0x08, 0x27, 0x75, 0x86, 0xB9, 0xBB, 0x9B, 0xDF, 0xEA, 0x49, 0xDE, 0x46, 0xCB, 0x83, 0x45
|
||||
};
|
||||
|
||||
|
||||
// "cn-pico/tlo"
|
||||
const static uint8_t test_output_pico_tlo[160] = {
|
||||
0x99, 0x75, 0xF2, 0xC1, 0xB3, 0xB4, 0x54, 0x34, 0xA4, 0x93, 0x86, 0x21, 0x30, 0x97, 0xF3, 0x1B,
|
||||
0xB4, 0xB9, 0xA6, 0x58, 0x6A, 0x7E, 0x81, 0xF4, 0x42, 0x9F, 0x6D, 0x5F, 0x65, 0xC3, 0x8D, 0x1A,
|
||||
0xFC, 0x67, 0xDF, 0xCC, 0xB5, 0xFC, 0x90, 0xD7, 0x85, 0x5A, 0xE9, 0x03, 0x36, 0x1E, 0xAB, 0xD7,
|
||||
0x6F, 0x1E, 0x40, 0xA2, 0x2A, 0x72, 0xAD, 0x3E, 0xF2, 0xD6, 0xAD, 0x27, 0xB5, 0xA6, 0x0C, 0xE5,
|
||||
0x1C, 0xB1, 0x53, 0xE9, 0x70, 0x7D, 0x69, 0xF1, 0xE1, 0x55, 0x28, 0x45, 0xF5, 0x76, 0x56, 0xE5,
|
||||
0x10, 0x0D, 0xEA, 0xFD, 0xD9, 0xD6, 0xAF, 0x0F, 0x47, 0x0C, 0x0D, 0xA2, 0x10, 0x16, 0x43, 0xEE,
|
||||
0x25, 0x2C, 0x07, 0x3A, 0x64, 0x29, 0x16, 0xFF, 0xF5, 0xA5, 0x0B, 0xA2, 0xE0, 0xBD, 0xDC, 0xCE,
|
||||
0x93, 0x3F, 0xEF, 0x6B, 0x08, 0xF4, 0x4D, 0x6A, 0x6E, 0x14, 0x13, 0x10, 0x98, 0x11, 0xE1, 0x13,
|
||||
0xF6, 0x9D, 0x3D, 0x31, 0xC4, 0x3A, 0xA9, 0x44, 0x4C, 0x38, 0xAB, 0xB5, 0x4B, 0xD9, 0xFB, 0xE6,
|
||||
0x98, 0xB9, 0x46, 0xE2, 0x00, 0xEB, 0x56, 0x33, 0x1E, 0xBC, 0xEB, 0xF1, 0xF6, 0x88, 0xD3, 0xF0
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -794,6 +794,11 @@ extern cn_mainloop_fun cn_trtl_mainloop_ryzen_asm;
|
|||
extern cn_mainloop_fun cn_trtl_mainloop_bulldozer_asm;
|
||||
extern cn_mainloop_fun cn_trtl_double_mainloop_sandybridge_asm;
|
||||
|
||||
extern cn_mainloop_fun cn_tlo_mainloop_ivybridge_asm;
|
||||
extern cn_mainloop_fun cn_tlo_mainloop_ryzen_asm;
|
||||
extern cn_mainloop_fun cn_tlo_mainloop_bulldozer_asm;
|
||||
extern cn_mainloop_fun cn_tlo_double_mainloop_sandybridge_asm;
|
||||
|
||||
extern cn_mainloop_fun cn_zls_mainloop_ivybridge_asm;
|
||||
extern cn_mainloop_fun cn_zls_mainloop_ryzen_asm;
|
||||
extern cn_mainloop_fun cn_zls_mainloop_bulldozer_asm;
|
||||
|
@ -879,6 +884,17 @@ inline void cryptonight_single_hash_asm(const uint8_t *__restrict__ input, size_
|
|||
cn_trtl_mainloop_bulldozer_asm(ctx);
|
||||
}
|
||||
}
|
||||
else if (ALGO == Algorithm::CN_PICO_TLO) {
|
||||
if (ASM == Assembly::INTEL) {
|
||||
cn_tlo_mainloop_ivybridge_asm(ctx);
|
||||
}
|
||||
else if (ASM == Assembly::RYZEN) {
|
||||
cn_tlo_mainloop_ryzen_asm(ctx);
|
||||
}
|
||||
else {
|
||||
cn_tlo_mainloop_bulldozer_asm(ctx);
|
||||
}
|
||||
}
|
||||
# endif
|
||||
else if (ALGO == Algorithm::CN_RWZ) {
|
||||
cnv2_rwz_mainloop_asm(ctx);
|
||||
|
@ -944,6 +960,9 @@ inline void cryptonight_double_hash_asm(const uint8_t *__restrict__ input, size_
|
|||
else if (ALGO == Algorithm::CN_PICO_0) {
|
||||
cn_trtl_double_mainloop_sandybridge_asm(ctx);
|
||||
}
|
||||
else if (ALGO == Algorithm::CN_PICO_TLO) {
|
||||
cn_tlo_double_mainloop_sandybridge_asm(ctx);
|
||||
}
|
||||
# endif
|
||||
else if (ALGO == Algorithm::CN_RWZ) {
|
||||
cnv2_rwz_double_mainloop_asm(ctx);
|
||||
|
|
|
@ -101,6 +101,9 @@ static AlgoName const algorithm_names[] = {
|
|||
{ "cryptonight-turtle", "cn-trtl", Algorithm::CN_PICO_0 },
|
||||
{ "cryptonight-ultralite", "cn-ultralite", Algorithm::CN_PICO_0 },
|
||||
{ "cryptonight_turtle", "cn_turtle", Algorithm::CN_PICO_0 },
|
||||
{ "cryptonight-pico/tlo", "cn-pico/tlo", Algorithm::CN_PICO_TLO },
|
||||
{ "cryptonight-talleo", "cn-talleo", Algorithm::CN_PICO_TLO },
|
||||
{ "cryptonight_talleo", "cn_talleo", Algorithm::CN_PICO_TLO },
|
||||
# endif
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
{ "randomx/0", "rx/0", Algorithm::RX_0 },
|
||||
|
@ -268,6 +271,7 @@ xmrig::Algorithm::Family xmrig::Algorithm::family(Id id)
|
|||
|
||||
# ifdef XMRIG_ALGO_CN_PICO
|
||||
case CN_PICO_0:
|
||||
case CN_PICO_TLO:
|
||||
return CN_PICO;
|
||||
# endif
|
||||
|
||||
|
|
|
@ -62,7 +62,8 @@ public:
|
|||
CN_HEAVY_0, // "cn-heavy/0" CryptoNight-Heavy (4 MB).
|
||||
CN_HEAVY_TUBE, // "cn-heavy/tube" CryptoNight-Heavy (modified, TUBE only).
|
||||
CN_HEAVY_XHV, // "cn-heavy/xhv" CryptoNight-Heavy (modified, Haven Protocol only).
|
||||
CN_PICO_0, // "cn-pico" CryptoNight Turtle (TRTL)
|
||||
CN_PICO_0, // "cn-pico" CryptoNight-Pico
|
||||
CN_PICO_TLO, // "cn-pico/tlo" CryptoNight-Pico (TLO)
|
||||
RX_0, // "rx/0" RandomX (reference configuration).
|
||||
RX_WOW, // "rx/wow" RandomWOW (Wownero).
|
||||
RX_LOKI, // "rx/loki" RandomXL (Loki).
|
||||
|
|
Loading…
Reference in a new issue