mirror of
https://github.com/xmrig/xmrig.git
synced 2026-01-03 08:22:50 -05:00
Compare commits
7 Commits
e970d9e856
...
v6.21.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5aa2c9042 | ||
|
|
fa35a32eee | ||
|
|
7b6ce59821 | ||
|
|
33315ba2ef | ||
|
|
2c9c40d623 | ||
|
|
daa6328418 | ||
|
|
8afd4d5f2f |
@@ -1,3 +1,8 @@
|
|||||||
|
# v6.21.1
|
||||||
|
- [#3391](https://github.com/xmrig/xmrig/pull/3391) Added support for townforge (monero fork using randomx).
|
||||||
|
- [#3399](https://github.com/xmrig/xmrig/pull/3399) Fixed Zephyr mining (OpenCL).
|
||||||
|
- [#3420](https://github.com/xmrig/xmrig/pull/3420) Fixed segfault in HTTP API rebind.
|
||||||
|
|
||||||
# v6.21.0
|
# v6.21.0
|
||||||
- [#3302](https://github.com/xmrig/xmrig/pull/3302) [#3312](https://github.com/xmrig/xmrig/pull/3312) Enabled keepalive for Windows (>= Vista).
|
- [#3302](https://github.com/xmrig/xmrig/pull/3302) [#3312](https://github.com/xmrig/xmrig/pull/3312) Enabled keepalive for Windows (>= Vista).
|
||||||
- [#3320](https://github.com/xmrig/xmrig/pull/3320) Added "built for OS/architecture/bits" to "ABOUT".
|
- [#3320](https://github.com/xmrig/xmrig/pull/3320) Added "built for OS/architecture/bits" to "ABOUT".
|
||||||
|
|||||||
@@ -14,9 +14,7 @@ option(WITH_HTTP "Enable HTTP protocol support (client/server)" ON)
|
|||||||
option(WITH_DEBUG_LOG "Enable debug log output" OFF)
|
option(WITH_DEBUG_LOG "Enable debug log output" OFF)
|
||||||
option(WITH_TLS "Enable OpenSSL support" ON)
|
option(WITH_TLS "Enable OpenSSL support" ON)
|
||||||
option(WITH_ASM "Enable ASM PoW implementations" ON)
|
option(WITH_ASM "Enable ASM PoW implementations" ON)
|
||||||
option(WITH_ASM_AMD "Enable ASM for AMD processors" ON)
|
option(WITH_MSR "Enable MSR mod & 1st-gen Ryzen fix" ON)
|
||||||
option(WITH_MSR "Enable MSR mod" ON)
|
|
||||||
option(WITH_MSR_ZEN "Enable MSR mod for AMD Zen-based processors" ON)
|
|
||||||
option(WITH_ENV_VARS "Enable environment variables support in config file" ON)
|
option(WITH_ENV_VARS "Enable environment variables support in config file" ON)
|
||||||
option(WITH_EMBEDDED_CONFIG "Enable internal embedded JSON config" OFF)
|
option(WITH_EMBEDDED_CONFIG "Enable internal embedded JSON config" OFF)
|
||||||
option(WITH_OPENCL "Enable OpenCL backend" ON)
|
option(WITH_OPENCL "Enable OpenCL backend" ON)
|
||||||
|
|||||||
@@ -44,17 +44,9 @@ if (WITH_ASM AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|||||||
set_property(TARGET ${XMRIG_ASM_LIBRARY} PROPERTY LINKER_LANGUAGE C)
|
set_property(TARGET ${XMRIG_ASM_LIBRARY} PROPERTY LINKER_LANGUAGE C)
|
||||||
|
|
||||||
add_definitions(/DXMRIG_FEATURE_ASM)
|
add_definitions(/DXMRIG_FEATURE_ASM)
|
||||||
if (WITH_ASM_AMD)
|
|
||||||
add_definitions(/DXMRIG_FEATURE_ASM_AMD)
|
|
||||||
message("-- WITH_ASM=ON (+amd)")
|
|
||||||
else()
|
|
||||||
message("-- WITH_ASM=ON (-amd)")
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
set(XMRIG_ASM_SOURCES "")
|
set(XMRIG_ASM_SOURCES "")
|
||||||
set(XMRIG_ASM_LIBRARY "")
|
set(XMRIG_ASM_LIBRARY "")
|
||||||
|
|
||||||
remove_definitions(/DXMRIG_FEATURE_ASM)
|
remove_definitions(/DXMRIG_FEATURE_ASM)
|
||||||
remove_definitions(/DXMRIG_FEATURE_ASM_AMD)
|
|
||||||
message("-- WITH_ASM=OFF")
|
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -104,13 +104,8 @@ if (WITH_RANDOMX)
|
|||||||
|
|
||||||
if (WITH_MSR AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND (XMRIG_OS_WIN OR XMRIG_OS_LINUX))
|
if (WITH_MSR AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND (XMRIG_OS_WIN OR XMRIG_OS_LINUX))
|
||||||
add_definitions(/DXMRIG_FEATURE_MSR)
|
add_definitions(/DXMRIG_FEATURE_MSR)
|
||||||
if (WITH_MSR_ZEN)
|
add_definitions(/DXMRIG_FIX_RYZEN)
|
||||||
add_definitions(/DXMRIG_FIX_RYZEN)
|
message("-- WITH_MSR=ON")
|
||||||
message("-- WITH_MSR=ON (+zen)")
|
|
||||||
else()
|
|
||||||
remove_definitions(/DXMRIG_FIX_RYZEN)
|
|
||||||
message("-- WITH_MSR=ON (-zen)")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (XMRIG_OS_WIN)
|
if (XMRIG_OS_WIN)
|
||||||
list(APPEND SOURCES_CRYPTO
|
list(APPEND SOURCES_CRYPTO
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
namespace xmrig {
|
namespace xmrig {
|
||||||
@@ -80,7 +81,8 @@ static rapidjson::Value getResources(rapidjson::Document &doc)
|
|||||||
|
|
||||||
xmrig::Api::Api(Base *base) :
|
xmrig::Api::Api(Base *base) :
|
||||||
m_base(base),
|
m_base(base),
|
||||||
m_timestamp(Chrono::currentMSecsSinceEpoch())
|
m_timestamp(Chrono::currentMSecsSinceEpoch()),
|
||||||
|
m_httpd(nullptr)
|
||||||
{
|
{
|
||||||
base->addListener(this);
|
base->addListener(this);
|
||||||
|
|
||||||
@@ -91,7 +93,11 @@ xmrig::Api::Api(Base *base) :
|
|||||||
xmrig::Api::~Api()
|
xmrig::Api::~Api()
|
||||||
{
|
{
|
||||||
# ifdef XMRIG_FEATURE_HTTP
|
# ifdef XMRIG_FEATURE_HTTP
|
||||||
delete m_httpd;
|
if (m_httpd) {
|
||||||
|
m_httpd->stop();
|
||||||
|
delete m_httpd;
|
||||||
|
m_httpd = nullptr; // Ensure the pointer is set to nullptr after deletion
|
||||||
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,8 +115,14 @@ void xmrig::Api::start()
|
|||||||
genWorkerId(m_base->config()->apiWorkerId());
|
genWorkerId(m_base->config()->apiWorkerId());
|
||||||
|
|
||||||
# ifdef XMRIG_FEATURE_HTTP
|
# ifdef XMRIG_FEATURE_HTTP
|
||||||
m_httpd = new Httpd(m_base);
|
if (!m_httpd) {
|
||||||
m_httpd->start();
|
m_httpd = new Httpd(m_base);
|
||||||
|
if (!m_httpd->start()) {
|
||||||
|
std::cerr << "HTTP server failed to start." << std::endl;
|
||||||
|
delete m_httpd; // Properly handle failure to start
|
||||||
|
m_httpd = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,7 +130,9 @@ void xmrig::Api::start()
|
|||||||
void xmrig::Api::stop()
|
void xmrig::Api::stop()
|
||||||
{
|
{
|
||||||
# ifdef XMRIG_FEATURE_HTTP
|
# ifdef XMRIG_FEATURE_HTTP
|
||||||
m_httpd->stop();
|
if (m_httpd) {
|
||||||
|
m_httpd->stop();
|
||||||
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,13 +140,15 @@ void xmrig::Api::stop()
|
|||||||
void xmrig::Api::tick()
|
void xmrig::Api::tick()
|
||||||
{
|
{
|
||||||
# ifdef XMRIG_FEATURE_HTTP
|
# ifdef XMRIG_FEATURE_HTTP
|
||||||
if (m_httpd->isBound() || !m_base->config()->http().isEnabled()) {
|
if (!m_httpd || !m_base->config()->http().isEnabled() || m_httpd->isBound()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (++m_ticks % 10 == 0) {
|
if (++m_ticks % 10 == 0) {
|
||||||
m_ticks = 0;
|
m_ticks = 0;
|
||||||
m_httpd->start();
|
if (m_httpd) {
|
||||||
|
m_httpd->start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* XMRig
|
/* XMRig
|
||||||
* Copyright (c) 2019 Howard Chu <https://github.com/hyc>
|
* Copyright (c) 2019 Howard Chu <https://github.com/hyc>
|
||||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
* Copyright (c) 2018-2024 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* Copyright (c) 2016-2024 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -59,7 +59,7 @@ public:
|
|||||||
static const char *kCoin;
|
static const char *kCoin;
|
||||||
static const char *kDaemon;
|
static const char *kDaemon;
|
||||||
static const char *kDaemonPollInterval;
|
static const char *kDaemonPollInterval;
|
||||||
static const char* kDaemonJobTimeout;
|
static const char *kDaemonJobTimeout;
|
||||||
static const char *kEnabled;
|
static const char *kEnabled;
|
||||||
static const char *kFingerprint;
|
static const char *kFingerprint;
|
||||||
static const char *kKeepalive;
|
static const char *kKeepalive;
|
||||||
@@ -70,11 +70,11 @@ public:
|
|||||||
static const char *kSOCKS5;
|
static const char *kSOCKS5;
|
||||||
static const char *kSubmitToOrigin;
|
static const char *kSubmitToOrigin;
|
||||||
static const char *kTls;
|
static const char *kTls;
|
||||||
static const char* kSni;
|
static const char *kSni;
|
||||||
static const char *kUrl;
|
static const char *kUrl;
|
||||||
static const char *kUser;
|
static const char *kUser;
|
||||||
static const char* kSpendSecretKey;
|
static const char *kSpendSecretKey;
|
||||||
static const char* kDaemonZMQPort;
|
static const char *kDaemonZMQPort;
|
||||||
static const char *kNicehashHost;
|
static const char *kNicehashHost;
|
||||||
|
|
||||||
constexpr static int kKeepAliveTimeout = 60;
|
constexpr static int kKeepAliveTimeout = 60;
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
* Copyright (c) 2014 Lucas Jones <https://github.com/lucasjones>
|
* Copyright (c) 2014 Lucas Jones <https://github.com/lucasjones>
|
||||||
* Copyright (c) 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
* Copyright (c) 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||||
* Copyright (c) 2016 Jay D Dee <jayddee246@gmail.com>
|
* Copyright (c) 2016 Jay D Dee <jayddee246@gmail.com>
|
||||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
* Copyright (c) 2018-2024 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* Copyright (c) 2016-2024 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -64,7 +64,7 @@ static inline const std::string &usage()
|
|||||||
|
|
||||||
# ifdef XMRIG_FEATURE_HTTP
|
# ifdef XMRIG_FEATURE_HTTP
|
||||||
u += " --daemon use daemon RPC instead of pool for solo mining\n";
|
u += " --daemon use daemon RPC instead of pool for solo mining\n";
|
||||||
u += " --daemon-zmq-port daemon's zmq-pub port number (only use it if daemon has it enabled)\n";
|
u += " --daemon-zmq-port=N daemon's zmq-pub port number (only use it if daemon has it enabled)\n";
|
||||||
u += " --daemon-poll-interval=N daemon poll interval in milliseconds (default: 1000)\n";
|
u += " --daemon-poll-interval=N daemon poll interval in milliseconds (default: 1000)\n";
|
||||||
u += " --daemon-job-timeout=N daemon job timeout in milliseconds (default: 15000)\n";
|
u += " --daemon-job-timeout=N daemon job timeout in milliseconds (default: 15000)\n";
|
||||||
u += " --self-select=URL self-select block templates from URL\n";
|
u += " --self-select=URL self-select block templates from URL\n";
|
||||||
@@ -94,13 +94,7 @@ static inline const std::string &usage()
|
|||||||
# ifdef XMRIG_ALGO_RANDOMX
|
# ifdef XMRIG_ALGO_RANDOMX
|
||||||
u += " --huge-pages-jit enable huge pages support for RandomX JIT code\n";
|
u += " --huge-pages-jit enable huge pages support for RandomX JIT code\n";
|
||||||
# endif
|
# endif
|
||||||
# ifdef XMRIG_FEATURE_ASM
|
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
u += " --asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer\n";
|
u += " --asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer\n";
|
||||||
# else
|
|
||||||
u += " --asm=ASM ASM optimizations, possible values: auto, none, intel\n";
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# if defined(__x86_64__) || defined(_M_AMD64)
|
# if defined(__x86_64__) || defined(_M_AMD64)
|
||||||
u += " --argon2-impl=IMPL argon2 implementation: x86_64, SSE2, SSSE3, XOP, AVX2, AVX-512F\n";
|
u += " --argon2-impl=IMPL argon2 implementation: x86_64, SSE2, SSSE3, XOP, AVX2, AVX-512F\n";
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ bool cn_vaes_enabled = false;
|
|||||||
|
|
||||||
|
|
||||||
#ifdef XMRIG_FEATURE_ASM
|
#ifdef XMRIG_FEATURE_ASM
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
# define ADD_FN_ASM(algo) do { \
|
# define ADD_FN_ASM(algo) do { \
|
||||||
m_map[algo]->data[AV_SINGLE][Assembly::INTEL] = cryptonight_single_hash_asm<algo, Assembly::INTEL>; \
|
m_map[algo]->data[AV_SINGLE][Assembly::INTEL] = cryptonight_single_hash_asm<algo, Assembly::INTEL>; \
|
||||||
m_map[algo]->data[AV_SINGLE][Assembly::RYZEN] = cryptonight_single_hash_asm<algo, Assembly::RYZEN>; \
|
m_map[algo]->data[AV_SINGLE][Assembly::RYZEN] = cryptonight_single_hash_asm<algo, Assembly::RYZEN>; \
|
||||||
@@ -64,50 +63,34 @@ bool cn_vaes_enabled = false;
|
|||||||
m_map[algo]->data[AV_DOUBLE][Assembly::RYZEN] = cryptonight_double_hash_asm<algo, Assembly::RYZEN>; \
|
m_map[algo]->data[AV_DOUBLE][Assembly::RYZEN] = cryptonight_double_hash_asm<algo, Assembly::RYZEN>; \
|
||||||
m_map[algo]->data[AV_DOUBLE][Assembly::BULLDOZER] = cryptonight_double_hash_asm<algo, Assembly::BULLDOZER>; \
|
m_map[algo]->data[AV_DOUBLE][Assembly::BULLDOZER] = cryptonight_double_hash_asm<algo, Assembly::BULLDOZER>; \
|
||||||
} while (0)
|
} while (0)
|
||||||
#else
|
|
||||||
# define ADD_FN_ASM(algo) do { \
|
|
||||||
m_map[algo]->data[AV_SINGLE][Assembly::INTEL] = cryptonight_single_hash_asm<algo, Assembly::INTEL>; \
|
|
||||||
m_map[algo]->data[AV_DOUBLE][Assembly::INTEL] = cryptonight_double_hash_asm<algo, Assembly::INTEL>; \
|
|
||||||
} while (0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
namespace xmrig {
|
namespace xmrig {
|
||||||
|
|
||||||
|
|
||||||
cn_mainloop_fun cn_half_mainloop_ivybridge_asm = nullptr;
|
cn_mainloop_fun cn_half_mainloop_ivybridge_asm = nullptr;
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
cn_mainloop_fun cn_half_mainloop_ryzen_asm = nullptr;
|
cn_mainloop_fun cn_half_mainloop_ryzen_asm = nullptr;
|
||||||
cn_mainloop_fun cn_half_mainloop_bulldozer_asm = nullptr;
|
cn_mainloop_fun cn_half_mainloop_bulldozer_asm = nullptr;
|
||||||
#endif
|
|
||||||
cn_mainloop_fun cn_half_double_mainloop_sandybridge_asm = nullptr;
|
cn_mainloop_fun cn_half_double_mainloop_sandybridge_asm = nullptr;
|
||||||
|
|
||||||
cn_mainloop_fun cn_trtl_mainloop_ivybridge_asm = nullptr;
|
cn_mainloop_fun cn_trtl_mainloop_ivybridge_asm = nullptr;
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
cn_mainloop_fun cn_trtl_mainloop_ryzen_asm = nullptr;
|
cn_mainloop_fun cn_trtl_mainloop_ryzen_asm = nullptr;
|
||||||
cn_mainloop_fun cn_trtl_mainloop_bulldozer_asm = nullptr;
|
cn_mainloop_fun cn_trtl_mainloop_bulldozer_asm = nullptr;
|
||||||
#endif
|
|
||||||
cn_mainloop_fun cn_trtl_double_mainloop_sandybridge_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_ivybridge_asm = nullptr;
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
cn_mainloop_fun cn_tlo_mainloop_ryzen_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_mainloop_bulldozer_asm = nullptr;
|
||||||
#endif
|
|
||||||
cn_mainloop_fun cn_tlo_double_mainloop_sandybridge_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_ivybridge_asm = nullptr;
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
cn_mainloop_fun cn_zls_mainloop_ryzen_asm = nullptr;
|
cn_mainloop_fun cn_zls_mainloop_ryzen_asm = nullptr;
|
||||||
cn_mainloop_fun cn_zls_mainloop_bulldozer_asm = nullptr;
|
cn_mainloop_fun cn_zls_mainloop_bulldozer_asm = nullptr;
|
||||||
#endif
|
|
||||||
cn_mainloop_fun cn_zls_double_mainloop_sandybridge_asm = nullptr;
|
cn_mainloop_fun cn_zls_double_mainloop_sandybridge_asm = nullptr;
|
||||||
|
|
||||||
cn_mainloop_fun cn_double_mainloop_ivybridge_asm = nullptr;
|
cn_mainloop_fun cn_double_mainloop_ivybridge_asm = nullptr;
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
cn_mainloop_fun cn_double_mainloop_ryzen_asm = nullptr;
|
cn_mainloop_fun cn_double_mainloop_ryzen_asm = nullptr;
|
||||||
cn_mainloop_fun cn_double_mainloop_bulldozer_asm = nullptr;
|
cn_mainloop_fun cn_double_mainloop_bulldozer_asm = nullptr;
|
||||||
#endif
|
|
||||||
cn_mainloop_fun cn_double_double_mainloop_sandybridge_asm = nullptr;
|
cn_mainloop_fun cn_double_double_mainloop_sandybridge_asm = nullptr;
|
||||||
|
|
||||||
cn_mainloop_fun cn_upx2_mainloop_asm = nullptr;
|
cn_mainloop_fun cn_upx2_mainloop_asm = nullptr;
|
||||||
@@ -177,41 +160,31 @@ static void patchAsmVariants()
|
|||||||
auto base = static_cast<uint8_t *>(VirtualMemory::allocateExecutableMemory(allocation_size, false));
|
auto base = static_cast<uint8_t *>(VirtualMemory::allocateExecutableMemory(allocation_size, false));
|
||||||
|
|
||||||
cn_half_mainloop_ivybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x0000);
|
cn_half_mainloop_ivybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x0000);
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
cn_half_mainloop_ryzen_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x1000);
|
cn_half_mainloop_ryzen_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x1000);
|
||||||
cn_half_mainloop_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x2000);
|
cn_half_mainloop_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x2000);
|
||||||
# endif
|
|
||||||
cn_half_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x3000);
|
cn_half_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x3000);
|
||||||
|
|
||||||
# ifdef XMRIG_ALGO_CN_PICO
|
# ifdef XMRIG_ALGO_CN_PICO
|
||||||
cn_trtl_mainloop_ivybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x4000);
|
cn_trtl_mainloop_ivybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x4000);
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
cn_trtl_mainloop_ryzen_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x5000);
|
cn_trtl_mainloop_ryzen_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x5000);
|
||||||
cn_trtl_mainloop_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x6000);
|
cn_trtl_mainloop_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x6000);
|
||||||
# endif
|
|
||||||
cn_trtl_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x7000);
|
cn_trtl_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x7000);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
cn_zls_mainloop_ivybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x8000);
|
cn_zls_mainloop_ivybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x8000);
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
cn_zls_mainloop_ryzen_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x9000);
|
cn_zls_mainloop_ryzen_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x9000);
|
||||||
cn_zls_mainloop_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xA000);
|
cn_zls_mainloop_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xA000);
|
||||||
# endif
|
|
||||||
cn_zls_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xB000);
|
cn_zls_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xB000);
|
||||||
|
|
||||||
cn_double_mainloop_ivybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xC000);
|
cn_double_mainloop_ivybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xC000);
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
cn_double_mainloop_ryzen_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xD000);
|
cn_double_mainloop_ryzen_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xD000);
|
||||||
cn_double_mainloop_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xE000);
|
cn_double_mainloop_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xE000);
|
||||||
# endif
|
|
||||||
cn_double_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xF000);
|
cn_double_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xF000);
|
||||||
|
|
||||||
# ifdef XMRIG_ALGO_CN_PICO
|
# ifdef XMRIG_ALGO_CN_PICO
|
||||||
cn_tlo_mainloop_ivybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x10000);
|
cn_tlo_mainloop_ivybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x10000);
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
cn_tlo_mainloop_ryzen_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x11000);
|
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_mainloop_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x12000);
|
||||||
# endif
|
|
||||||
cn_tlo_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x13000);
|
cn_tlo_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x13000);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@@ -247,10 +220,8 @@ static void patchAsmVariants()
|
|||||||
constexpr uint32_t ITER = CnAlgo<Algorithm::CN_HALF>().iterations();
|
constexpr uint32_t ITER = CnAlgo<Algorithm::CN_HALF>().iterations();
|
||||||
|
|
||||||
patchCode(cn_half_mainloop_ivybridge_asm, cnv2_mainloop_ivybridge_asm, ITER);
|
patchCode(cn_half_mainloop_ivybridge_asm, cnv2_mainloop_ivybridge_asm, ITER);
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
patchCode(cn_half_mainloop_ryzen_asm, cnv2_mainloop_ryzen_asm, ITER);
|
patchCode(cn_half_mainloop_ryzen_asm, cnv2_mainloop_ryzen_asm, ITER);
|
||||||
patchCode(cn_half_mainloop_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER);
|
patchCode(cn_half_mainloop_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER);
|
||||||
# endif
|
|
||||||
patchCode(cn_half_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER);
|
patchCode(cn_half_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,10 +231,8 @@ static void patchAsmVariants()
|
|||||||
constexpr uint32_t MASK = CnAlgo<Algorithm::CN_PICO_0>().mask();
|
constexpr uint32_t MASK = CnAlgo<Algorithm::CN_PICO_0>().mask();
|
||||||
|
|
||||||
patchCode(cn_trtl_mainloop_ivybridge_asm, cnv2_mainloop_ivybridge_asm, ITER, MASK);
|
patchCode(cn_trtl_mainloop_ivybridge_asm, cnv2_mainloop_ivybridge_asm, ITER, MASK);
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
patchCode(cn_trtl_mainloop_ryzen_asm, cnv2_mainloop_ryzen_asm, ITER, MASK);
|
patchCode(cn_trtl_mainloop_ryzen_asm, cnv2_mainloop_ryzen_asm, ITER, MASK);
|
||||||
patchCode(cn_trtl_mainloop_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER, MASK);
|
patchCode(cn_trtl_mainloop_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER, MASK);
|
||||||
# endif
|
|
||||||
patchCode(cn_trtl_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER, MASK);
|
patchCode(cn_trtl_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER, MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,10 +241,8 @@ static void patchAsmVariants()
|
|||||||
constexpr uint32_t MASK = CnAlgo<Algorithm::CN_PICO_TLO>().mask();
|
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_ivybridge_asm, cnv2_mainloop_ivybridge_asm, ITER, MASK);
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
patchCode(cn_tlo_mainloop_ryzen_asm, cnv2_mainloop_ryzen_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_mainloop_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER, MASK);
|
||||||
# endif
|
|
||||||
patchCode(cn_tlo_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER, MASK);
|
patchCode(cn_tlo_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER, MASK);
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
@@ -284,10 +251,8 @@ static void patchAsmVariants()
|
|||||||
constexpr uint32_t ITER = CnAlgo<Algorithm::CN_ZLS>().iterations();
|
constexpr uint32_t ITER = CnAlgo<Algorithm::CN_ZLS>().iterations();
|
||||||
|
|
||||||
patchCode(cn_zls_mainloop_ivybridge_asm, cnv2_mainloop_ivybridge_asm, ITER);
|
patchCode(cn_zls_mainloop_ivybridge_asm, cnv2_mainloop_ivybridge_asm, ITER);
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
patchCode(cn_zls_mainloop_ryzen_asm, cnv2_mainloop_ryzen_asm, ITER);
|
patchCode(cn_zls_mainloop_ryzen_asm, cnv2_mainloop_ryzen_asm, ITER);
|
||||||
patchCode(cn_zls_mainloop_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER);
|
patchCode(cn_zls_mainloop_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER);
|
||||||
# endif
|
|
||||||
patchCode(cn_zls_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER);
|
patchCode(cn_zls_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,10 +260,8 @@ static void patchAsmVariants()
|
|||||||
constexpr uint32_t ITER = CnAlgo<Algorithm::CN_DOUBLE>().iterations();
|
constexpr uint32_t ITER = CnAlgo<Algorithm::CN_DOUBLE>().iterations();
|
||||||
|
|
||||||
patchCode(cn_double_mainloop_ivybridge_asm, cnv2_mainloop_ivybridge_asm, ITER);
|
patchCode(cn_double_mainloop_ivybridge_asm, cnv2_mainloop_ivybridge_asm, ITER);
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
patchCode(cn_double_mainloop_ryzen_asm, cnv2_mainloop_ryzen_asm, ITER);
|
patchCode(cn_double_mainloop_ryzen_asm, cnv2_mainloop_ryzen_asm, ITER);
|
||||||
patchCode(cn_double_mainloop_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER);
|
patchCode(cn_double_mainloop_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER);
|
||||||
# endif
|
|
||||||
patchCode(cn_double_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER);
|
patchCode(cn_double_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -852,16 +852,12 @@ extern "C" void cnv1_single_mainloop_asm(cryptonight_ctx * *ctx);
|
|||||||
extern "C" void cnv1_double_mainloop_asm(cryptonight_ctx **ctx);
|
extern "C" void cnv1_double_mainloop_asm(cryptonight_ctx **ctx);
|
||||||
extern "C" void cnv1_quad_mainloop_asm(cryptonight_ctx **ctx);
|
extern "C" void cnv1_quad_mainloop_asm(cryptonight_ctx **ctx);
|
||||||
extern "C" void cnv2_mainloop_ivybridge_asm(cryptonight_ctx **ctx);
|
extern "C" void cnv2_mainloop_ivybridge_asm(cryptonight_ctx **ctx);
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
extern "C" void cnv2_mainloop_ryzen_asm(cryptonight_ctx **ctx);
|
extern "C" void cnv2_mainloop_ryzen_asm(cryptonight_ctx **ctx);
|
||||||
extern "C" void cnv2_mainloop_bulldozer_asm(cryptonight_ctx **ctx);
|
extern "C" void cnv2_mainloop_bulldozer_asm(cryptonight_ctx **ctx);
|
||||||
#endif
|
|
||||||
extern "C" void cnv2_double_mainloop_sandybridge_asm(cryptonight_ctx **ctx);
|
extern "C" void cnv2_double_mainloop_sandybridge_asm(cryptonight_ctx **ctx);
|
||||||
extern "C" void cnv2_rwz_mainloop_asm(cryptonight_ctx **ctx);
|
extern "C" void cnv2_rwz_mainloop_asm(cryptonight_ctx **ctx);
|
||||||
extern "C" void cnv2_rwz_double_mainloop_asm(cryptonight_ctx **ctx);
|
extern "C" void cnv2_rwz_double_mainloop_asm(cryptonight_ctx **ctx);
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
extern "C" void cnv2_upx_double_mainloop_zen3_asm(cryptonight_ctx **ctx);
|
extern "C" void cnv2_upx_double_mainloop_zen3_asm(cryptonight_ctx **ctx);
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
namespace xmrig {
|
namespace xmrig {
|
||||||
@@ -871,38 +867,28 @@ typedef void (*cn_mainloop_fun)(cryptonight_ctx **ctx);
|
|||||||
|
|
||||||
|
|
||||||
extern cn_mainloop_fun cn_half_mainloop_ivybridge_asm;
|
extern cn_mainloop_fun cn_half_mainloop_ivybridge_asm;
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
extern cn_mainloop_fun cn_half_mainloop_ryzen_asm;
|
extern cn_mainloop_fun cn_half_mainloop_ryzen_asm;
|
||||||
extern cn_mainloop_fun cn_half_mainloop_bulldozer_asm;
|
extern cn_mainloop_fun cn_half_mainloop_bulldozer_asm;
|
||||||
#endif
|
|
||||||
extern cn_mainloop_fun cn_half_double_mainloop_sandybridge_asm;
|
extern cn_mainloop_fun cn_half_double_mainloop_sandybridge_asm;
|
||||||
|
|
||||||
extern cn_mainloop_fun cn_trtl_mainloop_ivybridge_asm;
|
extern cn_mainloop_fun cn_trtl_mainloop_ivybridge_asm;
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
extern cn_mainloop_fun cn_trtl_mainloop_ryzen_asm;
|
extern cn_mainloop_fun cn_trtl_mainloop_ryzen_asm;
|
||||||
extern cn_mainloop_fun cn_trtl_mainloop_bulldozer_asm;
|
extern cn_mainloop_fun cn_trtl_mainloop_bulldozer_asm;
|
||||||
#endif
|
|
||||||
extern cn_mainloop_fun cn_trtl_double_mainloop_sandybridge_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_ivybridge_asm;
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
extern cn_mainloop_fun cn_tlo_mainloop_ryzen_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_mainloop_bulldozer_asm;
|
||||||
#endif
|
|
||||||
extern cn_mainloop_fun cn_tlo_double_mainloop_sandybridge_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_ivybridge_asm;
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
extern cn_mainloop_fun cn_zls_mainloop_ryzen_asm;
|
extern cn_mainloop_fun cn_zls_mainloop_ryzen_asm;
|
||||||
extern cn_mainloop_fun cn_zls_mainloop_bulldozer_asm;
|
extern cn_mainloop_fun cn_zls_mainloop_bulldozer_asm;
|
||||||
#endif
|
|
||||||
extern cn_mainloop_fun cn_zls_double_mainloop_sandybridge_asm;
|
extern cn_mainloop_fun cn_zls_double_mainloop_sandybridge_asm;
|
||||||
|
|
||||||
extern cn_mainloop_fun cn_double_mainloop_ivybridge_asm;
|
extern cn_mainloop_fun cn_double_mainloop_ivybridge_asm;
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
extern cn_mainloop_fun cn_double_mainloop_ryzen_asm;
|
extern cn_mainloop_fun cn_double_mainloop_ryzen_asm;
|
||||||
extern cn_mainloop_fun cn_double_mainloop_bulldozer_asm;
|
extern cn_mainloop_fun cn_double_mainloop_bulldozer_asm;
|
||||||
#endif
|
|
||||||
extern cn_mainloop_fun cn_double_double_mainloop_sandybridge_asm;
|
extern cn_mainloop_fun cn_double_double_mainloop_sandybridge_asm;
|
||||||
|
|
||||||
extern cn_mainloop_fun cn_upx2_mainloop_asm;
|
extern cn_mainloop_fun cn_upx2_mainloop_asm;
|
||||||
@@ -978,54 +964,46 @@ inline void cryptonight_single_hash_asm(const uint8_t *__restrict__ input, size_
|
|||||||
if (ASM == Assembly::INTEL) {
|
if (ASM == Assembly::INTEL) {
|
||||||
cnv2_mainloop_ivybridge_asm(ctx);
|
cnv2_mainloop_ivybridge_asm(ctx);
|
||||||
}
|
}
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
else if (ASM == Assembly::RYZEN) {
|
else if (ASM == Assembly::RYZEN) {
|
||||||
cnv2_mainloop_ryzen_asm(ctx);
|
cnv2_mainloop_ryzen_asm(ctx);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cnv2_mainloop_bulldozer_asm(ctx);
|
cnv2_mainloop_bulldozer_asm(ctx);
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
else if (ALGO == Algorithm::CN_HALF) {
|
else if (ALGO == Algorithm::CN_HALF) {
|
||||||
if (ASM == Assembly::INTEL) {
|
if (ASM == Assembly::INTEL) {
|
||||||
cn_half_mainloop_ivybridge_asm(ctx);
|
cn_half_mainloop_ivybridge_asm(ctx);
|
||||||
}
|
}
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
else if (ASM == Assembly::RYZEN) {
|
else if (ASM == Assembly::RYZEN) {
|
||||||
cn_half_mainloop_ryzen_asm(ctx);
|
cn_half_mainloop_ryzen_asm(ctx);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cn_half_mainloop_bulldozer_asm(ctx);
|
cn_half_mainloop_bulldozer_asm(ctx);
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
# ifdef XMRIG_ALGO_CN_PICO
|
# ifdef XMRIG_ALGO_CN_PICO
|
||||||
else if (ALGO == Algorithm::CN_PICO_0) {
|
else if (ALGO == Algorithm::CN_PICO_0) {
|
||||||
if (ASM == Assembly::INTEL) {
|
if (ASM == Assembly::INTEL) {
|
||||||
cn_trtl_mainloop_ivybridge_asm(ctx);
|
cn_trtl_mainloop_ivybridge_asm(ctx);
|
||||||
}
|
}
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
else if (ASM == Assembly::RYZEN) {
|
else if (ASM == Assembly::RYZEN) {
|
||||||
cn_trtl_mainloop_ryzen_asm(ctx);
|
cn_trtl_mainloop_ryzen_asm(ctx);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cn_trtl_mainloop_bulldozer_asm(ctx);
|
cn_trtl_mainloop_bulldozer_asm(ctx);
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
else if (ALGO == Algorithm::CN_PICO_TLO) {
|
else if (ALGO == Algorithm::CN_PICO_TLO) {
|
||||||
if (ASM == Assembly::INTEL) {
|
if (ASM == Assembly::INTEL) {
|
||||||
cn_tlo_mainloop_ivybridge_asm(ctx);
|
cn_tlo_mainloop_ivybridge_asm(ctx);
|
||||||
}
|
}
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
else if (ASM == Assembly::RYZEN) {
|
else if (ASM == Assembly::RYZEN) {
|
||||||
cn_tlo_mainloop_ryzen_asm(ctx);
|
cn_tlo_mainloop_ryzen_asm(ctx);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cn_tlo_mainloop_bulldozer_asm(ctx);
|
cn_tlo_mainloop_bulldozer_asm(ctx);
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
else if (ALGO == Algorithm::CN_RWZ) {
|
else if (ALGO == Algorithm::CN_RWZ) {
|
||||||
@@ -1035,27 +1013,23 @@ inline void cryptonight_single_hash_asm(const uint8_t *__restrict__ input, size_
|
|||||||
if (ASM == Assembly::INTEL) {
|
if (ASM == Assembly::INTEL) {
|
||||||
cn_zls_mainloop_ivybridge_asm(ctx);
|
cn_zls_mainloop_ivybridge_asm(ctx);
|
||||||
}
|
}
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
else if (ASM == Assembly::RYZEN) {
|
else if (ASM == Assembly::RYZEN) {
|
||||||
cn_zls_mainloop_ryzen_asm(ctx);
|
cn_zls_mainloop_ryzen_asm(ctx);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cn_zls_mainloop_bulldozer_asm(ctx);
|
cn_zls_mainloop_bulldozer_asm(ctx);
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
else if (ALGO == Algorithm::CN_DOUBLE) {
|
else if (ALGO == Algorithm::CN_DOUBLE) {
|
||||||
if (ASM == Assembly::INTEL) {
|
if (ASM == Assembly::INTEL) {
|
||||||
cn_double_mainloop_ivybridge_asm(ctx);
|
cn_double_mainloop_ivybridge_asm(ctx);
|
||||||
}
|
}
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
else if (ASM == Assembly::RYZEN) {
|
else if (ASM == Assembly::RYZEN) {
|
||||||
cn_double_mainloop_ryzen_asm(ctx);
|
cn_double_mainloop_ryzen_asm(ctx);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cn_double_mainloop_bulldozer_asm(ctx);
|
cn_double_mainloop_bulldozer_asm(ctx);
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
# ifdef XMRIG_ALGO_CN_FEMTO
|
# ifdef XMRIG_ALGO_CN_FEMTO
|
||||||
else if (ALGO == Algorithm::CN_UPX2) {
|
else if (ALGO == Algorithm::CN_UPX2) {
|
||||||
@@ -1120,16 +1094,12 @@ inline void cryptonight_double_hash_asm(const uint8_t *__restrict__ input, size_
|
|||||||
# endif
|
# endif
|
||||||
# ifdef XMRIG_ALGO_CN_FEMTO
|
# ifdef XMRIG_ALGO_CN_FEMTO
|
||||||
else if (ALGO == Algorithm::CN_UPX2) {
|
else if (ALGO == Algorithm::CN_UPX2) {
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
if (Cpu::info()->arch() == ICpuInfo::ARCH_ZEN3) {
|
if (Cpu::info()->arch() == ICpuInfo::ARCH_ZEN3) {
|
||||||
cnv2_upx_double_mainloop_zen3_asm(ctx);
|
cnv2_upx_double_mainloop_zen3_asm(ctx);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cn_upx2_double_mainloop_asm(ctx);
|
cn_upx2_double_mainloop_asm(ctx);
|
||||||
}
|
}
|
||||||
# else
|
|
||||||
cn_upx2_double_mainloop_asm(ctx);
|
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
else if (ALGO == Algorithm::CN_RWZ) {
|
else if (ALGO == Algorithm::CN_RWZ) {
|
||||||
|
|||||||
@@ -15,16 +15,12 @@
|
|||||||
.global FN_PREFIX(cnv1_double_mainloop_asm)
|
.global FN_PREFIX(cnv1_double_mainloop_asm)
|
||||||
.global FN_PREFIX(cnv1_quad_mainloop_asm)
|
.global FN_PREFIX(cnv1_quad_mainloop_asm)
|
||||||
.global FN_PREFIX(cnv2_mainloop_ivybridge_asm)
|
.global FN_PREFIX(cnv2_mainloop_ivybridge_asm)
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
.global FN_PREFIX(cnv2_mainloop_ryzen_asm)
|
.global FN_PREFIX(cnv2_mainloop_ryzen_asm)
|
||||||
.global FN_PREFIX(cnv2_mainloop_bulldozer_asm)
|
.global FN_PREFIX(cnv2_mainloop_bulldozer_asm)
|
||||||
#endif
|
|
||||||
.global FN_PREFIX(cnv2_double_mainloop_sandybridge_asm)
|
.global FN_PREFIX(cnv2_double_mainloop_sandybridge_asm)
|
||||||
.global FN_PREFIX(cnv2_rwz_mainloop_asm)
|
.global FN_PREFIX(cnv2_rwz_mainloop_asm)
|
||||||
.global FN_PREFIX(cnv2_rwz_double_mainloop_asm)
|
.global FN_PREFIX(cnv2_rwz_double_mainloop_asm)
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
.global FN_PREFIX(cnv2_upx_double_mainloop_zen3_asm)
|
.global FN_PREFIX(cnv2_upx_double_mainloop_zen3_asm)
|
||||||
#endif
|
|
||||||
|
|
||||||
ALIGN(64)
|
ALIGN(64)
|
||||||
FN_PREFIX(cnv1_single_mainloop_asm):
|
FN_PREFIX(cnv1_single_mainloop_asm):
|
||||||
@@ -62,7 +58,6 @@ FN_PREFIX(cnv2_mainloop_ivybridge_asm):
|
|||||||
ret 0
|
ret 0
|
||||||
mov eax, 3735929054
|
mov eax, 3735929054
|
||||||
|
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
ALIGN(64)
|
ALIGN(64)
|
||||||
FN_PREFIX(cnv2_mainloop_ryzen_asm):
|
FN_PREFIX(cnv2_mainloop_ryzen_asm):
|
||||||
sub rsp, 48
|
sub rsp, 48
|
||||||
@@ -80,7 +75,6 @@ FN_PREFIX(cnv2_mainloop_bulldozer_asm):
|
|||||||
add rsp, 48
|
add rsp, 48
|
||||||
ret 0
|
ret 0
|
||||||
mov eax, 3735929054
|
mov eax, 3735929054
|
||||||
#endif
|
|
||||||
|
|
||||||
ALIGN(64)
|
ALIGN(64)
|
||||||
FN_PREFIX(cnv2_double_mainloop_sandybridge_asm):
|
FN_PREFIX(cnv2_double_mainloop_sandybridge_asm):
|
||||||
@@ -109,7 +103,6 @@ FN_PREFIX(cnv2_rwz_double_mainloop_asm):
|
|||||||
ret 0
|
ret 0
|
||||||
mov eax, 3735929054
|
mov eax, 3735929054
|
||||||
|
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
ALIGN(64)
|
ALIGN(64)
|
||||||
FN_PREFIX(cnv2_upx_double_mainloop_zen3_asm):
|
FN_PREFIX(cnv2_upx_double_mainloop_zen3_asm):
|
||||||
sub rsp, 48
|
sub rsp, 48
|
||||||
@@ -118,7 +111,6 @@ FN_PREFIX(cnv2_upx_double_mainloop_zen3_asm):
|
|||||||
add rsp, 48
|
add rsp, 48
|
||||||
ret 0
|
ret 0
|
||||||
mov eax, 3735929054
|
mov eax, 3735929054
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__linux__) && defined(__ELF__)
|
#if defined(__linux__) && defined(__ELF__)
|
||||||
.section .note.GNU-stack,"",%progbits
|
.section .note.GNU-stack,"",%progbits
|
||||||
|
|||||||
@@ -5,16 +5,12 @@
|
|||||||
.global cnv1_double_mainloop_asm
|
.global cnv1_double_mainloop_asm
|
||||||
.global cnv1_quad_mainloop_asm
|
.global cnv1_quad_mainloop_asm
|
||||||
.global cnv2_mainloop_ivybridge_asm
|
.global cnv2_mainloop_ivybridge_asm
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
.global cnv2_mainloop_ryzen_asm
|
.global cnv2_mainloop_ryzen_asm
|
||||||
.global cnv2_mainloop_bulldozer_asm
|
.global cnv2_mainloop_bulldozer_asm
|
||||||
#endif
|
|
||||||
.global cnv2_double_mainloop_sandybridge_asm
|
.global cnv2_double_mainloop_sandybridge_asm
|
||||||
.global cnv2_rwz_mainloop_asm
|
.global cnv2_rwz_mainloop_asm
|
||||||
.global cnv2_rwz_double_mainloop_asm
|
.global cnv2_rwz_double_mainloop_asm
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
.global cnv2_upx_double_mainloop_zen3_asm
|
.global cnv2_upx_double_mainloop_zen3_asm
|
||||||
#endif
|
|
||||||
|
|
||||||
ALIGN(64)
|
ALIGN(64)
|
||||||
cnv1_single_mainloop_asm:
|
cnv1_single_mainloop_asm:
|
||||||
@@ -40,7 +36,6 @@ cnv2_mainloop_ivybridge_asm:
|
|||||||
ret 0
|
ret 0
|
||||||
mov eax, 3735929054
|
mov eax, 3735929054
|
||||||
|
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
ALIGN(64)
|
ALIGN(64)
|
||||||
cnv2_mainloop_ryzen_asm:
|
cnv2_mainloop_ryzen_asm:
|
||||||
#include "../cn2/cnv2_main_loop_ryzen.inc"
|
#include "../cn2/cnv2_main_loop_ryzen.inc"
|
||||||
@@ -52,7 +47,6 @@ cnv2_mainloop_bulldozer_asm:
|
|||||||
#include "../cn2/cnv2_main_loop_bulldozer.inc"
|
#include "../cn2/cnv2_main_loop_bulldozer.inc"
|
||||||
ret 0
|
ret 0
|
||||||
mov eax, 3735929054
|
mov eax, 3735929054
|
||||||
#endif
|
|
||||||
|
|
||||||
ALIGN(64)
|
ALIGN(64)
|
||||||
cnv2_double_mainloop_sandybridge_asm:
|
cnv2_double_mainloop_sandybridge_asm:
|
||||||
@@ -72,10 +66,8 @@ cnv2_rwz_double_mainloop_asm:
|
|||||||
ret 0
|
ret 0
|
||||||
mov eax, 3735929054
|
mov eax, 3735929054
|
||||||
|
|
||||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
ALIGN(64)
|
ALIGN(64)
|
||||||
cnv2_upx_double_mainloop_zen3_asm:
|
cnv2_upx_double_mainloop_zen3_asm:
|
||||||
#include "cn2/cnv2_upx_double_mainloop_zen3.inc"
|
#include "cn2/cnv2_upx_double_mainloop_zen3.inc"
|
||||||
ret 0
|
ret 0
|
||||||
mov eax, 3735929054
|
mov eax, 3735929054
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -41,12 +41,10 @@ randomx_vm *xmrig::RxVm::create(RxDataset *dataset, uint8_t *scratchpad, bool so
|
|||||||
flags |= RANDOMX_FLAG_JIT;
|
flags |= RANDOMX_FLAG_JIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
|
||||||
const auto asmId = assembly == Assembly::AUTO ? Cpu::info()->assembly() : assembly.id();
|
const auto asmId = assembly == Assembly::AUTO ? Cpu::info()->assembly() : assembly.id();
|
||||||
if ((asmId == Assembly::RYZEN) || (asmId == Assembly::BULLDOZER)) {
|
if ((asmId == Assembly::RYZEN) || (asmId == Assembly::BULLDOZER)) {
|
||||||
flags |= RANDOMX_FLAG_AMD;
|
flags |= RANDOMX_FLAG_AMD;
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
|
|
||||||
return randomx_create_vm(static_cast<randomx_flags>(flags), !dataset->get() ? dataset->cache()->get() : nullptr, dataset->get(), scratchpad, node);
|
return randomx_create_vm(static_cast<randomx_flags>(flags), !dataset->get() ? dataset->cache()->get() : nullptr, dataset->get(), scratchpad, node);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* XMRig
|
/* XMRig
|
||||||
* Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
|
* Copyright (c) 2018-2024 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright (c) 2016-2023 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* Copyright (c) 2016-2024 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -22,10 +22,10 @@
|
|||||||
#define APP_ID "xmrig"
|
#define APP_ID "xmrig"
|
||||||
#define APP_NAME "XMRig"
|
#define APP_NAME "XMRig"
|
||||||
#define APP_DESC "XMRig miner"
|
#define APP_DESC "XMRig miner"
|
||||||
#define APP_VERSION "6.21.1-dev"
|
#define APP_VERSION "6.21.1"
|
||||||
#define APP_DOMAIN "xmrig.com"
|
#define APP_DOMAIN "xmrig.com"
|
||||||
#define APP_SITE "www.xmrig.com"
|
#define APP_SITE "www.xmrig.com"
|
||||||
#define APP_COPYRIGHT "Copyright (C) 2016-2023 xmrig.com"
|
#define APP_COPYRIGHT "Copyright (C) 2016-2024 xmrig.com"
|
||||||
#define APP_KIND "miner"
|
#define APP_KIND "miner"
|
||||||
|
|
||||||
#define APP_VER_MAJOR 6
|
#define APP_VER_MAJOR 6
|
||||||
|
|||||||
Reference in New Issue
Block a user