mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-24 13:32:46 -05:00
Compare commits
8 Commits
v6.22.1
...
1eaecc1cc7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1eaecc1cc7 | ||
|
|
c5d8b8265b | ||
|
|
77c14c8362 | ||
|
|
8b03750806 | ||
|
|
40949f2767 | ||
|
|
56c447e02a | ||
|
|
21c206f05d | ||
|
|
a776ebf394 |
@@ -14,7 +14,9 @@ option(WITH_HTTP "Enable HTTP protocol support (client/server)" ON)
|
||||
option(WITH_DEBUG_LOG "Enable debug log output" OFF)
|
||||
option(WITH_TLS "Enable OpenSSL support" ON)
|
||||
option(WITH_ASM "Enable ASM PoW implementations" ON)
|
||||
option(WITH_MSR "Enable MSR mod & 1st-gen Ryzen fix" ON)
|
||||
option(WITH_ASM_AMD "Enable ASM for AMD processors" 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_EMBEDDED_CONFIG "Enable internal embedded JSON config" OFF)
|
||||
option(WITH_OPENCL "Enable OpenCL backend" ON)
|
||||
|
||||
@@ -44,9 +44,17 @@ if (WITH_ASM AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set_property(TARGET ${XMRIG_ASM_LIBRARY} PROPERTY LINKER_LANGUAGE C)
|
||||
|
||||
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()
|
||||
set(XMRIG_ASM_SOURCES "")
|
||||
set(XMRIG_ASM_LIBRARY "")
|
||||
|
||||
remove_definitions(/DXMRIG_FEATURE_ASM)
|
||||
remove_definitions(/DXMRIG_FEATURE_ASM_AMD)
|
||||
message("-- WITH_ASM=OFF")
|
||||
endif()
|
||||
|
||||
@@ -104,8 +104,13 @@ 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))
|
||||
add_definitions(/DXMRIG_FEATURE_MSR)
|
||||
add_definitions(/DXMRIG_FIX_RYZEN)
|
||||
message("-- WITH_MSR=ON")
|
||||
if (WITH_MSR_ZEN)
|
||||
add_definitions(/DXMRIG_FIX_RYZEN)
|
||||
message("-- WITH_MSR=ON (+zen)")
|
||||
else()
|
||||
remove_definitions(/DXMRIG_FIX_RYZEN)
|
||||
message("-- WITH_MSR=ON (-zen)")
|
||||
endif()
|
||||
|
||||
if (XMRIG_OS_WIN)
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
#include "base/tools/Handle.h"
|
||||
|
||||
|
||||
inline static const char *format(double h, char *buf, size_t size)
|
||||
inline static const char *format(std::pair<bool, double> h, char *buf, size_t size)
|
||||
{
|
||||
if (std::isnormal(h)) {
|
||||
snprintf(buf, size, (h < 100.0) ? "%04.2f" : "%03.1f", h);
|
||||
if (h.first) {
|
||||
snprintf(buf, size, (h.second < 100.0) ? "%04.2f" : "%03.1f", h.second);
|
||||
return buf;
|
||||
}
|
||||
|
||||
@@ -80,15 +80,16 @@ double xmrig::Hashrate::average() const
|
||||
}
|
||||
|
||||
|
||||
const char *xmrig::Hashrate::format(double h, char *buf, size_t size)
|
||||
const char *xmrig::Hashrate::format(std::pair<bool, double> h, char *buf, size_t size)
|
||||
{
|
||||
return ::format(h, buf, size);
|
||||
}
|
||||
|
||||
|
||||
rapidjson::Value xmrig::Hashrate::normalize(double d)
|
||||
rapidjson::Value xmrig::Hashrate::normalize(std::pair<bool, double> d)
|
||||
{
|
||||
return Json::normalize(d, false);
|
||||
using namespace rapidjson;
|
||||
return d.first ? Value(floor(d.second * 100.0) / 100.0) : Value(kNullType);
|
||||
}
|
||||
|
||||
|
||||
@@ -122,11 +123,11 @@ rapidjson::Value xmrig::Hashrate::toJSON(size_t threadId, rapidjson::Document &d
|
||||
#endif
|
||||
|
||||
|
||||
double xmrig::Hashrate::hashrate(size_t index, size_t ms) const
|
||||
std::pair<bool, double> xmrig::Hashrate::hashrate(size_t index, size_t ms) const
|
||||
{
|
||||
assert(index < m_threads);
|
||||
if (index >= m_threads) {
|
||||
return nan("");
|
||||
return { false, 0.0 };
|
||||
}
|
||||
|
||||
uint64_t earliestHashCount = 0;
|
||||
@@ -157,17 +158,27 @@ double xmrig::Hashrate::hashrate(size_t index, size_t ms) const
|
||||
} while (idx != idx_start);
|
||||
|
||||
if (!haveFullSet || earliestStamp == 0 || lastestStamp == 0) {
|
||||
return nan("");
|
||||
return { false, 0.0 };
|
||||
}
|
||||
|
||||
if (lastestStamp - earliestStamp == 0) {
|
||||
return nan("");
|
||||
if (lastestHashCnt == earliestHashCount) {
|
||||
return { true, 0.0 };
|
||||
}
|
||||
|
||||
if (lastestStamp == earliestStamp) {
|
||||
return { false, 0.0 };
|
||||
}
|
||||
|
||||
const auto hashes = static_cast<double>(lastestHashCnt - earliestHashCount);
|
||||
const auto time = static_cast<double>(lastestStamp - earliestStamp) / 1000.0;
|
||||
const auto time = static_cast<double>(lastestStamp - earliestStamp);
|
||||
|
||||
return hashes / time;
|
||||
const auto hr = hashes * 1000.0 / time;
|
||||
|
||||
if (!std::isnormal(hr)) {
|
||||
return { false, 0.0 };
|
||||
}
|
||||
|
||||
return { true, hr };
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -47,16 +47,16 @@ public:
|
||||
Hashrate(size_t threads);
|
||||
~Hashrate();
|
||||
|
||||
inline double calc(size_t ms) const { const double data = hashrate(0U, ms); return std::isnormal(data) ? data : 0.0; }
|
||||
inline double calc(size_t threadId, size_t ms) const { return hashrate(threadId + 1, ms); }
|
||||
inline std::pair<bool, double> calc(size_t ms) const { return hashrate(0U, ms); }
|
||||
inline std::pair<bool, double> calc(size_t threadId, size_t ms) const { return hashrate(threadId + 1, ms); }
|
||||
inline size_t threads() const { return m_threads > 0U ? m_threads - 1U : 0U; }
|
||||
inline void add(size_t threadId, uint64_t count, uint64_t timestamp) { addData(threadId + 1U, count, timestamp); }
|
||||
inline void add(uint64_t count, uint64_t timestamp) { addData(0U, count, timestamp); }
|
||||
|
||||
double average() const;
|
||||
|
||||
static const char *format(double h, char *buf, size_t size);
|
||||
static rapidjson::Value normalize(double d);
|
||||
static const char *format(std::pair<bool, double> h, char *buf, size_t size);
|
||||
static rapidjson::Value normalize(std::pair<bool, double> d);
|
||||
|
||||
# ifdef XMRIG_FEATURE_API
|
||||
rapidjson::Value toJSON(rapidjson::Document &doc) const;
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
# endif
|
||||
|
||||
private:
|
||||
double hashrate(size_t index, size_t ms) const;
|
||||
std::pair<bool, double> hashrate(size_t index, size_t ms) const;
|
||||
void addData(size_t index, uint64_t count, uint64_t timestamp);
|
||||
|
||||
constexpr static size_t kBucketSize = 2 << 11;
|
||||
|
||||
@@ -342,7 +342,7 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith
|
||||
}
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
if ((algorithm.family() == Algorithm::RANDOM_X) && L3_exclusive && (PUs > cores.size()) && (PUs < cores.size() * 2)) {
|
||||
if ((vendor() == VENDOR_INTEL) && (algorithm.family() == Algorithm::RANDOM_X) && L3_exclusive && (PUs < cores.size() * 2)) {
|
||||
// Use all L3+L2 on latest Intel CPUs with P-cores, E-cores and exclusive L3 cache
|
||||
cacheHashes = (L3 + L2) / scratchpad;
|
||||
}
|
||||
|
||||
@@ -372,15 +372,20 @@ void xmrig::CudaBackend::printHashrate(bool details)
|
||||
|
||||
char num[16 * 3] = { 0 };
|
||||
|
||||
const double hashrate_short = hashrate()->calc(Hashrate::ShortInterval);
|
||||
const double hashrate_medium = hashrate()->calc(Hashrate::MediumInterval);
|
||||
const double hashrate_large = hashrate()->calc(Hashrate::LargeInterval);
|
||||
auto hashrate_short = hashrate()->calc(Hashrate::ShortInterval);
|
||||
auto hashrate_medium = hashrate()->calc(Hashrate::MediumInterval);
|
||||
auto hashrate_large = hashrate()->calc(Hashrate::LargeInterval);
|
||||
|
||||
double scale = 1.0;
|
||||
const char* h = " H/s";
|
||||
|
||||
if ((hashrate_short >= 1e6) || (hashrate_medium >= 1e6) || (hashrate_large >= 1e6)) {
|
||||
if ((hashrate_short.second >= 1e6) || (hashrate_medium.second >= 1e6) || (hashrate_large.second >= 1e6)) {
|
||||
scale = 1e-6;
|
||||
|
||||
hashrate_short.second *= scale;
|
||||
hashrate_medium.second *= scale;
|
||||
hashrate_large.second *= scale;
|
||||
|
||||
h = "MH/s";
|
||||
}
|
||||
|
||||
@@ -388,12 +393,20 @@ void xmrig::CudaBackend::printHashrate(bool details)
|
||||
|
||||
size_t i = 0;
|
||||
for (const auto& data : d_ptr->threads) {
|
||||
Log::print("| %8zu | %8" PRId64 " | %8s | %8s | %8s |" CYAN_BOLD(" #%u") YELLOW(" %s") GREEN(" %s"),
|
||||
auto h0 = hashrate()->calc(i, Hashrate::ShortInterval);
|
||||
auto h1 = hashrate()->calc(i, Hashrate::MediumInterval);
|
||||
auto h2 = hashrate()->calc(i, Hashrate::LargeInterval);
|
||||
|
||||
h0.second *= scale;
|
||||
h1.second *= scale;
|
||||
h2.second *= scale;
|
||||
|
||||
Log::print("| %8zu | %8" PRId64 " | %8s | %8s | %8s |" CYAN_BOLD(" #%u") YELLOW(" %s") GREEN(" %s"),
|
||||
i,
|
||||
data.thread.affinity(),
|
||||
Hashrate::format(hashrate()->calc(i, Hashrate::ShortInterval) * scale, num, sizeof num / 3),
|
||||
Hashrate::format(hashrate()->calc(i, Hashrate::MediumInterval) * scale, num + 16, sizeof num / 3),
|
||||
Hashrate::format(hashrate()->calc(i, Hashrate::LargeInterval) * scale, num + 16 * 2, sizeof num / 3),
|
||||
Hashrate::format(h0, num, sizeof num / 3),
|
||||
Hashrate::format(h1, num + 16, sizeof num / 3),
|
||||
Hashrate::format(h2, num + 16 * 2, sizeof num / 3),
|
||||
data.device.index(),
|
||||
data.device.topology().toString().data(),
|
||||
data.device.name().data()
|
||||
@@ -403,9 +416,9 @@ void xmrig::CudaBackend::printHashrate(bool details)
|
||||
}
|
||||
|
||||
Log::print(WHITE_BOLD_S "| - | - | %8s | %8s | %8s |",
|
||||
Hashrate::format(hashrate_short * scale, num, sizeof num / 3),
|
||||
Hashrate::format(hashrate_medium * scale, num + 16, sizeof num / 3),
|
||||
Hashrate::format(hashrate_large * scale, num + 16 * 2, sizeof num / 3)
|
||||
Hashrate::format(hashrate_short , num, sizeof num / 3),
|
||||
Hashrate::format(hashrate_medium, num + 16, sizeof num / 3),
|
||||
Hashrate::format(hashrate_large , num + 16 * 2, sizeof num / 3)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -352,15 +352,20 @@ void xmrig::OclBackend::printHashrate(bool details)
|
||||
|
||||
char num[16 * 3] = { 0 };
|
||||
|
||||
const double hashrate_short = hashrate()->calc(Hashrate::ShortInterval);
|
||||
const double hashrate_medium = hashrate()->calc(Hashrate::MediumInterval);
|
||||
const double hashrate_large = hashrate()->calc(Hashrate::LargeInterval);
|
||||
auto hashrate_short = hashrate()->calc(Hashrate::ShortInterval);
|
||||
auto hashrate_medium = hashrate()->calc(Hashrate::MediumInterval);
|
||||
auto hashrate_large = hashrate()->calc(Hashrate::LargeInterval);
|
||||
|
||||
double scale = 1.0;
|
||||
const char* h = " H/s";
|
||||
|
||||
if ((hashrate_short >= 1e6) || (hashrate_medium >= 1e6) || (hashrate_large >= 1e6)) {
|
||||
if ((hashrate_short.second >= 1e6) || (hashrate_medium.second >= 1e6) || (hashrate_large.second >= 1e6)) {
|
||||
scale = 1e-6;
|
||||
|
||||
hashrate_short.second *= scale;
|
||||
hashrate_medium.second *= scale;
|
||||
hashrate_large.second *= scale;
|
||||
|
||||
h = "MH/s";
|
||||
}
|
||||
|
||||
@@ -368,12 +373,16 @@ void xmrig::OclBackend::printHashrate(bool details)
|
||||
|
||||
size_t i = 0;
|
||||
for (const auto& data : d_ptr->threads) {
|
||||
Log::print("| %8zu | %8" PRId64 " | %8s | %8s | %8s |" CYAN_BOLD(" #%u") YELLOW(" %s") " %s",
|
||||
auto h0 = hashrate()->calc(i, Hashrate::ShortInterval);
|
||||
auto h1 = hashrate()->calc(i, Hashrate::MediumInterval);
|
||||
auto h2 = hashrate()->calc(i, Hashrate::LargeInterval);
|
||||
|
||||
Log::print("| %8zu | %8" PRId64 " | %8s | %8s | %8s |" CYAN_BOLD(" #%u") YELLOW(" %s") " %s",
|
||||
i,
|
||||
data.affinity,
|
||||
Hashrate::format(hashrate()->calc(i, Hashrate::ShortInterval) * scale, num, sizeof num / 3),
|
||||
Hashrate::format(hashrate()->calc(i, Hashrate::MediumInterval) * scale, num + 16, sizeof num / 3),
|
||||
Hashrate::format(hashrate()->calc(i, Hashrate::LargeInterval) * scale, num + 16 * 2, sizeof num / 3),
|
||||
Hashrate::format(h0, num, sizeof num / 3),
|
||||
Hashrate::format(h1, num + 16, sizeof num / 3),
|
||||
Hashrate::format(h2, num + 16 * 2, sizeof num / 3),
|
||||
data.device.index(),
|
||||
data.device.topology().toString().data(),
|
||||
data.device.printableName().data()
|
||||
@@ -383,9 +392,9 @@ void xmrig::OclBackend::printHashrate(bool details)
|
||||
}
|
||||
|
||||
Log::print(WHITE_BOLD_S "| - | - | %8s | %8s | %8s |",
|
||||
Hashrate::format(hashrate_short * scale, num, sizeof num / 3),
|
||||
Hashrate::format(hashrate_medium * scale, num + 16, sizeof num / 3),
|
||||
Hashrate::format(hashrate_large * scale, num + 16 * 2, sizeof num / 3)
|
||||
Hashrate::format(hashrate_short , num, sizeof num / 3),
|
||||
Hashrate::format(hashrate_medium, num + 16, sizeof num / 3),
|
||||
Hashrate::format(hashrate_large , num + 16 * 2, sizeof num / 3)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
Value total(kArrayType);
|
||||
Value threads(kArrayType);
|
||||
|
||||
double t[3] = { 0.0 };
|
||||
std::pair<bool, double> t[3] = { { true, 0.0 }, { true, 0.0 }, { true, 0.0 } };
|
||||
|
||||
for (IBackend *backend : backends) {
|
||||
const Hashrate *hr = backend->hashrate();
|
||||
@@ -181,9 +181,13 @@ public:
|
||||
continue;
|
||||
}
|
||||
|
||||
t[0] += hr->calc(Hashrate::ShortInterval);
|
||||
t[1] += hr->calc(Hashrate::MediumInterval);
|
||||
t[2] += hr->calc(Hashrate::LargeInterval);
|
||||
const auto h0 = hr->calc(Hashrate::ShortInterval);
|
||||
const auto h1 = hr->calc(Hashrate::MediumInterval);
|
||||
const auto h2 = hr->calc(Hashrate::LargeInterval);
|
||||
|
||||
if (h0.first) { t[0].second += h0.second; } else { t[0].first = false; }
|
||||
if (h1.first) { t[1].second += h1.second; } else { t[1].first = false; }
|
||||
if (h2.first) { t[2].second += h2.second; } else { t[2].first = false; }
|
||||
|
||||
if (version > 1) {
|
||||
continue;
|
||||
@@ -204,7 +208,7 @@ public:
|
||||
total.PushBack(Hashrate::normalize(t[2]), allocator);
|
||||
|
||||
hashrate.AddMember("total", total, allocator);
|
||||
hashrate.AddMember("highest", Hashrate::normalize(maxHashrate[algorithm]), allocator);
|
||||
hashrate.AddMember("highest", Hashrate::normalize({ maxHashrate[algorithm] > 0.0, maxHashrate[algorithm] }), allocator);
|
||||
|
||||
if (version == 1) {
|
||||
hashrate.AddMember("threads", threads, allocator);
|
||||
@@ -283,7 +287,7 @@ public:
|
||||
void printHashrate(bool details)
|
||||
{
|
||||
char num[16 * 5] = { 0 };
|
||||
double speed[3] = { 0.0 };
|
||||
std::pair<bool, double> speed[3] = { { true, 0.0 }, { true, 0.0 }, { true, 0.0 } };
|
||||
uint32_t count = 0;
|
||||
|
||||
double avg_hashrate = 0.0;
|
||||
@@ -293,9 +297,13 @@ public:
|
||||
if (hashrate) {
|
||||
++count;
|
||||
|
||||
speed[0] += hashrate->calc(Hashrate::ShortInterval);
|
||||
speed[1] += hashrate->calc(Hashrate::MediumInterval);
|
||||
speed[2] += hashrate->calc(Hashrate::LargeInterval);
|
||||
const auto h0 = hashrate->calc(Hashrate::ShortInterval);
|
||||
const auto h1 = hashrate->calc(Hashrate::MediumInterval);
|
||||
const auto h2 = hashrate->calc(Hashrate::LargeInterval);
|
||||
|
||||
if (h0.first) { speed[0].second += h0.second; } else { speed[0].first = false; }
|
||||
if (h1.first) { speed[1].second += h1.second; } else { speed[1].first = false; }
|
||||
if (h2.first) { speed[2].second += h2.second; } else { speed[2].first = false; }
|
||||
|
||||
avg_hashrate += hashrate->average();
|
||||
}
|
||||
@@ -312,8 +320,13 @@ public:
|
||||
double scale = 1.0;
|
||||
const char* h = "H/s";
|
||||
|
||||
if ((speed[0] >= 1e6) || (speed[1] >= 1e6) || (speed[2] >= 1e6) || (maxHashrate[algorithm] >= 1e6)) {
|
||||
if ((speed[0].second >= 1e6) || (speed[1].second >= 1e6) || (speed[2].second >= 1e6) || (maxHashrate[algorithm] >= 1e6)) {
|
||||
scale = 1e-6;
|
||||
|
||||
speed[0].second *= scale;
|
||||
speed[1].second *= scale;
|
||||
speed[2].second *= scale;
|
||||
|
||||
h = "MH/s";
|
||||
}
|
||||
|
||||
@@ -322,16 +335,16 @@ public:
|
||||
|
||||
# ifdef XMRIG_ALGO_GHOSTRIDER
|
||||
if (algorithm.family() == Algorithm::GHOSTRIDER) {
|
||||
snprintf(avg_hashrate_buf, sizeof(avg_hashrate_buf), " avg " CYAN_BOLD("%s %s"), Hashrate::format(avg_hashrate * scale, num + 16 * 4, 16), h);
|
||||
snprintf(avg_hashrate_buf, sizeof(avg_hashrate_buf), " avg " CYAN_BOLD("%s %s"), Hashrate::format({ true, avg_hashrate * scale }, num + 16 * 4, 16), h);
|
||||
}
|
||||
# endif
|
||||
|
||||
LOG_INFO("%s " WHITE_BOLD("speed") " 10s/60s/15m " CYAN_BOLD("%s") CYAN(" %s %s ") CYAN_BOLD("%s") " max " CYAN_BOLD("%s %s") "%s",
|
||||
Tags::miner(),
|
||||
Hashrate::format(speed[0] * scale, num, 16),
|
||||
Hashrate::format(speed[1] * scale, num + 16, 16),
|
||||
Hashrate::format(speed[2] * scale, num + 16 * 2, 16), h,
|
||||
Hashrate::format(maxHashrate[algorithm] * scale, num + 16 * 3, 16), h,
|
||||
Hashrate::format(speed[0], num, 16),
|
||||
Hashrate::format(speed[1], num + 16, 16),
|
||||
Hashrate::format(speed[2], num + 16 * 2, 16), h,
|
||||
Hashrate::format({ maxHashrate[algorithm] > 0.0, maxHashrate[algorithm] * scale }, num + 16 * 3, 16), h,
|
||||
avg_hashrate_buf
|
||||
);
|
||||
|
||||
@@ -646,7 +659,10 @@ void xmrig::Miner::onTimer(const Timer *)
|
||||
}
|
||||
|
||||
if (backend->hashrate()) {
|
||||
maxHashrate += backend->hashrate()->calc(Hashrate::ShortInterval);
|
||||
const auto h = backend->hashrate()->calc(Hashrate::ShortInterval);
|
||||
if (h.first) {
|
||||
maxHashrate += h.second;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,13 @@ static inline const std::string &usage()
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
u += " --huge-pages-jit enable huge pages support for RandomX JIT code\n";
|
||||
# endif
|
||||
# ifdef XMRIG_FEATURE_ASM
|
||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
||||
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)
|
||||
u += " --argon2-impl=IMPL argon2 implementation: x86_64, SSE2, SSSE3, XOP, AVX2, AVX-512F\n";
|
||||
|
||||
@@ -55,6 +55,7 @@ bool cn_vaes_enabled = false;
|
||||
|
||||
|
||||
#ifdef XMRIG_FEATURE_ASM
|
||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
||||
# 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::RYZEN] = cryptonight_single_hash_asm<algo, Assembly::RYZEN>; \
|
||||
@@ -63,34 +64,50 @@ 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::BULLDOZER] = cryptonight_double_hash_asm<algo, Assembly::BULLDOZER>; \
|
||||
} 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 {
|
||||
|
||||
|
||||
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_bulldozer_asm = nullptr;
|
||||
#endif
|
||||
cn_mainloop_fun cn_half_double_mainloop_sandybridge_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_bulldozer_asm = nullptr;
|
||||
#endif
|
||||
cn_mainloop_fun cn_trtl_double_mainloop_sandybridge_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_bulldozer_asm = nullptr;
|
||||
#endif
|
||||
cn_mainloop_fun cn_tlo_double_mainloop_sandybridge_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_bulldozer_asm = nullptr;
|
||||
#endif
|
||||
cn_mainloop_fun cn_zls_double_mainloop_sandybridge_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_bulldozer_asm = nullptr;
|
||||
#endif
|
||||
cn_mainloop_fun cn_double_double_mainloop_sandybridge_asm = nullptr;
|
||||
|
||||
cn_mainloop_fun cn_upx2_mainloop_asm = nullptr;
|
||||
@@ -160,31 +177,41 @@ static void patchAsmVariants()
|
||||
auto base = static_cast<uint8_t *>(VirtualMemory::allocateExecutableMemory(allocation_size, false));
|
||||
|
||||
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_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x2000);
|
||||
# endif
|
||||
cn_half_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x3000);
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_PICO
|
||||
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_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x6000);
|
||||
# endif
|
||||
cn_trtl_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x7000);
|
||||
# endif
|
||||
|
||||
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_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xA000);
|
||||
# endif
|
||||
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);
|
||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
||||
cn_double_mainloop_ryzen_asm = reinterpret_cast<cn_mainloop_fun> (base + 0xD000);
|
||||
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);
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_PICO
|
||||
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_bulldozer_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x12000);
|
||||
# endif
|
||||
cn_tlo_double_mainloop_sandybridge_asm = reinterpret_cast<cn_mainloop_fun> (base + 0x13000);
|
||||
# endif
|
||||
|
||||
@@ -220,8 +247,10 @@ static void patchAsmVariants()
|
||||
constexpr uint32_t ITER = CnAlgo<Algorithm::CN_HALF>().iterations();
|
||||
|
||||
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_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER);
|
||||
# endif
|
||||
patchCode(cn_half_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER);
|
||||
}
|
||||
|
||||
@@ -231,8 +260,10 @@ static void patchAsmVariants()
|
||||
constexpr uint32_t MASK = CnAlgo<Algorithm::CN_PICO_0>().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_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER, MASK);
|
||||
# endif
|
||||
patchCode(cn_trtl_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER, MASK);
|
||||
}
|
||||
|
||||
@@ -241,8 +272,10 @@ static void patchAsmVariants()
|
||||
constexpr uint32_t MASK = CnAlgo<Algorithm::CN_PICO_TLO>().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_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER, MASK);
|
||||
# endif
|
||||
patchCode(cn_tlo_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER, MASK);
|
||||
}
|
||||
# endif
|
||||
@@ -251,8 +284,10 @@ static void patchAsmVariants()
|
||||
constexpr uint32_t ITER = CnAlgo<Algorithm::CN_ZLS>().iterations();
|
||||
|
||||
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_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER);
|
||||
# endif
|
||||
patchCode(cn_zls_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER);
|
||||
}
|
||||
|
||||
@@ -260,8 +295,10 @@ static void patchAsmVariants()
|
||||
constexpr uint32_t ITER = CnAlgo<Algorithm::CN_DOUBLE>().iterations();
|
||||
|
||||
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_bulldozer_asm, cnv2_mainloop_bulldozer_asm, ITER);
|
||||
# endif
|
||||
patchCode(cn_double_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, ITER);
|
||||
}
|
||||
|
||||
|
||||
@@ -852,12 +852,16 @@ extern "C" void cnv1_single_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 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_bulldozer_asm(cryptonight_ctx **ctx);
|
||||
#endif
|
||||
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_double_mainloop_asm(cryptonight_ctx **ctx);
|
||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
||||
extern "C" void cnv2_upx_double_mainloop_zen3_asm(cryptonight_ctx **ctx);
|
||||
#endif
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
@@ -867,28 +871,38 @@ typedef void (*cn_mainloop_fun)(cryptonight_ctx **ctx);
|
||||
|
||||
|
||||
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_bulldozer_asm;
|
||||
#endif
|
||||
extern cn_mainloop_fun cn_half_double_mainloop_sandybridge_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_bulldozer_asm;
|
||||
#endif
|
||||
extern cn_mainloop_fun cn_trtl_double_mainloop_sandybridge_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_bulldozer_asm;
|
||||
#endif
|
||||
extern cn_mainloop_fun cn_tlo_double_mainloop_sandybridge_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_bulldozer_asm;
|
||||
#endif
|
||||
extern cn_mainloop_fun cn_zls_double_mainloop_sandybridge_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_bulldozer_asm;
|
||||
#endif
|
||||
extern cn_mainloop_fun cn_double_double_mainloop_sandybridge_asm;
|
||||
|
||||
extern cn_mainloop_fun cn_upx2_mainloop_asm;
|
||||
@@ -964,46 +978,54 @@ inline void cryptonight_single_hash_asm(const uint8_t *__restrict__ input, size_
|
||||
if (ASM == Assembly::INTEL) {
|
||||
cnv2_mainloop_ivybridge_asm(ctx);
|
||||
}
|
||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
||||
else if (ASM == Assembly::RYZEN) {
|
||||
cnv2_mainloop_ryzen_asm(ctx);
|
||||
}
|
||||
else {
|
||||
cnv2_mainloop_bulldozer_asm(ctx);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
else if (ALGO == Algorithm::CN_HALF) {
|
||||
if (ASM == Assembly::INTEL) {
|
||||
cn_half_mainloop_ivybridge_asm(ctx);
|
||||
}
|
||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
||||
else if (ASM == Assembly::RYZEN) {
|
||||
cn_half_mainloop_ryzen_asm(ctx);
|
||||
}
|
||||
else {
|
||||
cn_half_mainloop_bulldozer_asm(ctx);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
# ifdef XMRIG_ALGO_CN_PICO
|
||||
else if (ALGO == Algorithm::CN_PICO_0) {
|
||||
if (ASM == Assembly::INTEL) {
|
||||
cn_trtl_mainloop_ivybridge_asm(ctx);
|
||||
}
|
||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
||||
else if (ASM == Assembly::RYZEN) {
|
||||
cn_trtl_mainloop_ryzen_asm(ctx);
|
||||
}
|
||||
else {
|
||||
cn_trtl_mainloop_bulldozer_asm(ctx);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
else if (ALGO == Algorithm::CN_PICO_TLO) {
|
||||
if (ASM == Assembly::INTEL) {
|
||||
cn_tlo_mainloop_ivybridge_asm(ctx);
|
||||
}
|
||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
||||
else if (ASM == Assembly::RYZEN) {
|
||||
cn_tlo_mainloop_ryzen_asm(ctx);
|
||||
}
|
||||
else {
|
||||
cn_tlo_mainloop_bulldozer_asm(ctx);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
# endif
|
||||
else if (ALGO == Algorithm::CN_RWZ) {
|
||||
@@ -1013,23 +1035,27 @@ inline void cryptonight_single_hash_asm(const uint8_t *__restrict__ input, size_
|
||||
if (ASM == Assembly::INTEL) {
|
||||
cn_zls_mainloop_ivybridge_asm(ctx);
|
||||
}
|
||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
||||
else if (ASM == Assembly::RYZEN) {
|
||||
cn_zls_mainloop_ryzen_asm(ctx);
|
||||
}
|
||||
else {
|
||||
cn_zls_mainloop_bulldozer_asm(ctx);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
else if (ALGO == Algorithm::CN_DOUBLE) {
|
||||
if (ASM == Assembly::INTEL) {
|
||||
cn_double_mainloop_ivybridge_asm(ctx);
|
||||
}
|
||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
||||
else if (ASM == Assembly::RYZEN) {
|
||||
cn_double_mainloop_ryzen_asm(ctx);
|
||||
}
|
||||
else {
|
||||
cn_double_mainloop_bulldozer_asm(ctx);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
# ifdef XMRIG_ALGO_CN_FEMTO
|
||||
else if (ALGO == Algorithm::CN_UPX2) {
|
||||
@@ -1094,12 +1120,16 @@ inline void cryptonight_double_hash_asm(const uint8_t *__restrict__ input, size_
|
||||
# endif
|
||||
# ifdef XMRIG_ALGO_CN_FEMTO
|
||||
else if (ALGO == Algorithm::CN_UPX2) {
|
||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
||||
if (Cpu::info()->arch() == ICpuInfo::ARCH_ZEN3) {
|
||||
cnv2_upx_double_mainloop_zen3_asm(ctx);
|
||||
}
|
||||
else {
|
||||
cn_upx2_double_mainloop_asm(ctx);
|
||||
}
|
||||
# else
|
||||
cn_upx2_double_mainloop_asm(ctx);
|
||||
# endif
|
||||
}
|
||||
# endif
|
||||
else if (ALGO == Algorithm::CN_RWZ) {
|
||||
|
||||
@@ -15,12 +15,16 @@
|
||||
.global FN_PREFIX(cnv1_double_mainloop_asm)
|
||||
.global FN_PREFIX(cnv1_quad_mainloop_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_bulldozer_asm)
|
||||
#endif
|
||||
.global FN_PREFIX(cnv2_double_mainloop_sandybridge_asm)
|
||||
.global FN_PREFIX(cnv2_rwz_mainloop_asm)
|
||||
.global FN_PREFIX(cnv2_rwz_double_mainloop_asm)
|
||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
||||
.global FN_PREFIX(cnv2_upx_double_mainloop_zen3_asm)
|
||||
#endif
|
||||
|
||||
ALIGN(64)
|
||||
FN_PREFIX(cnv1_single_mainloop_asm):
|
||||
@@ -58,6 +62,7 @@ FN_PREFIX(cnv2_mainloop_ivybridge_asm):
|
||||
ret 0
|
||||
mov eax, 3735929054
|
||||
|
||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
||||
ALIGN(64)
|
||||
FN_PREFIX(cnv2_mainloop_ryzen_asm):
|
||||
sub rsp, 48
|
||||
@@ -75,6 +80,7 @@ FN_PREFIX(cnv2_mainloop_bulldozer_asm):
|
||||
add rsp, 48
|
||||
ret 0
|
||||
mov eax, 3735929054
|
||||
#endif
|
||||
|
||||
ALIGN(64)
|
||||
FN_PREFIX(cnv2_double_mainloop_sandybridge_asm):
|
||||
@@ -103,6 +109,7 @@ FN_PREFIX(cnv2_rwz_double_mainloop_asm):
|
||||
ret 0
|
||||
mov eax, 3735929054
|
||||
|
||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
||||
ALIGN(64)
|
||||
FN_PREFIX(cnv2_upx_double_mainloop_zen3_asm):
|
||||
sub rsp, 48
|
||||
@@ -111,6 +118,7 @@ FN_PREFIX(cnv2_upx_double_mainloop_zen3_asm):
|
||||
add rsp, 48
|
||||
ret 0
|
||||
mov eax, 3735929054
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) && defined(__ELF__)
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
||||
@@ -5,12 +5,16 @@
|
||||
.global cnv1_double_mainloop_asm
|
||||
.global cnv1_quad_mainloop_asm
|
||||
.global cnv2_mainloop_ivybridge_asm
|
||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
||||
.global cnv2_mainloop_ryzen_asm
|
||||
.global cnv2_mainloop_bulldozer_asm
|
||||
#endif
|
||||
.global cnv2_double_mainloop_sandybridge_asm
|
||||
.global cnv2_rwz_mainloop_asm
|
||||
.global cnv2_rwz_double_mainloop_asm
|
||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
||||
.global cnv2_upx_double_mainloop_zen3_asm
|
||||
#endif
|
||||
|
||||
ALIGN(64)
|
||||
cnv1_single_mainloop_asm:
|
||||
@@ -36,6 +40,7 @@ cnv2_mainloop_ivybridge_asm:
|
||||
ret 0
|
||||
mov eax, 3735929054
|
||||
|
||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
||||
ALIGN(64)
|
||||
cnv2_mainloop_ryzen_asm:
|
||||
#include "../cn2/cnv2_main_loop_ryzen.inc"
|
||||
@@ -47,6 +52,7 @@ cnv2_mainloop_bulldozer_asm:
|
||||
#include "../cn2/cnv2_main_loop_bulldozer.inc"
|
||||
ret 0
|
||||
mov eax, 3735929054
|
||||
#endif
|
||||
|
||||
ALIGN(64)
|
||||
cnv2_double_mainloop_sandybridge_asm:
|
||||
@@ -66,8 +72,10 @@ cnv2_rwz_double_mainloop_asm:
|
||||
ret 0
|
||||
mov eax, 3735929054
|
||||
|
||||
#ifdef XMRIG_FEATURE_ASM_AMD
|
||||
ALIGN(64)
|
||||
cnv2_upx_double_mainloop_zen3_asm:
|
||||
#include "cn2/cnv2_upx_double_mainloop_zen3.inc"
|
||||
ret 0
|
||||
mov eax, 3735929054
|
||||
#endif
|
||||
|
||||
@@ -41,10 +41,12 @@ randomx_vm *xmrig::RxVm::create(RxDataset *dataset, uint8_t *scratchpad, bool so
|
||||
flags |= RANDOMX_FLAG_JIT;
|
||||
}
|
||||
|
||||
# ifdef XMRIG_FEATURE_ASM_AMD
|
||||
const auto asmId = assembly == Assembly::AUTO ? Cpu::info()->assembly() : assembly.id();
|
||||
if ((asmId == Assembly::RYZEN) || (asmId == Assembly::BULLDOZER)) {
|
||||
flags |= RANDOMX_FLAG_AMD;
|
||||
}
|
||||
# endif
|
||||
|
||||
return randomx_create_vm(static_cast<randomx_flags>(flags), !dataset->get() ? dataset->cache()->get() : nullptr, dataset->get(), scratchpad, node);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define APP_ID "xmrig"
|
||||
#define APP_NAME "XMRig"
|
||||
#define APP_DESC "XMRig miner"
|
||||
#define APP_VERSION "6.22.1"
|
||||
#define APP_VERSION "6.22.2-dev"
|
||||
#define APP_DOMAIN "xmrig.com"
|
||||
#define APP_SITE "www.xmrig.com"
|
||||
#define APP_COPYRIGHT "Copyright (C) 2016-2024 xmrig.com"
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#define APP_VER_MAJOR 6
|
||||
#define APP_VER_MINOR 22
|
||||
#define APP_VER_PATCH 1
|
||||
#define APP_VER_PATCH 2
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# if (_MSC_VER >= 1930)
|
||||
|
||||
Reference in New Issue
Block a user