From b38e432647e41accf7a8f5f10a261592d9a10217 Mon Sep 17 00:00:00 2001 From: XMRig Date: Mon, 17 Jun 2019 04:06:38 +0700 Subject: [PATCH] Moved keccak files. --- CMakeLists.txt | 4 ++-- src/api/Api.cpp | 2 +- src/crypto/cn/CryptoNight_arm.h | 2 +- src/crypto/cn/CryptoNight_x86.h | 5 ++++- src/{common/crypto => crypto/common}/keccak.cpp | 2 +- src/{common/crypto => crypto/common}/keccak.h | 0 src/net/strategies/DonateStrategy.cpp | 2 +- 7 files changed, 10 insertions(+), 7 deletions(-) rename src/{common/crypto => crypto/common}/keccak.cpp (99%) rename src/{common/crypto => crypto/common}/keccak.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c70a673b..2dfd52e0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,6 @@ set(HEADERS src/api/interfaces/IApiListener.h src/App.h src/common/cpu/Cpu.h - src/common/crypto/keccak.h src/common/interfaces/ICpuInfo.h src/common/Platform.h src/common/xmrig.h @@ -69,6 +68,7 @@ set(HEADERS_CRYPTO src/crypto/cn/skein_port.h src/crypto/cn/soft_aes.h src/crypto/common/Algorithm.h + src/crypto/common/keccak.h src/crypto/common/portable/mm_malloc.h src/crypto/common/VirtualMemory.h ) @@ -83,7 +83,6 @@ set(SOURCES "${SOURCES_BASE}" "${SOURCES_BASE_HTTP}" src/App.cpp - src/common/crypto/keccak.cpp src/common/Platform.cpp src/core/config/Config.cpp src/core/config/ConfigTransform.cpp @@ -109,6 +108,7 @@ set(SOURCES_CRYPTO src/crypto/cn/c_skein.c src/crypto/cn/CnHash.cpp src/crypto/common/Algorithm.cpp + src/crypto/common/keccak.cpp ) if (WIN32) diff --git a/src/api/Api.cpp b/src/api/Api.cpp index a11325f32..caebcba75 100644 --- a/src/api/Api.cpp +++ b/src/api/Api.cpp @@ -39,9 +39,9 @@ #include "base/kernel/Base.h" #include "base/tools/Buffer.h" #include "base/tools/Chrono.h" -#include "common/crypto/keccak.h" #include "core/config/Config.h" #include "core/Controller.h" +#include "crypto/common/keccak.h" #include "version.h" diff --git a/src/crypto/cn/CryptoNight_arm.h b/src/crypto/cn/CryptoNight_arm.h index 6d56b5481..022666349 100644 --- a/src/crypto/cn/CryptoNight_arm.h +++ b/src/crypto/cn/CryptoNight_arm.h @@ -28,11 +28,11 @@ #define XMRIG_CRYPTONIGHT_ARM_H -#include "common/crypto/keccak.h" #include "crypto/cn/CnAlgo.h" #include "crypto/cn/CryptoNight_monero.h" #include "crypto/cn/CryptoNight.h" #include "crypto/cn/soft_aes.h" +#include "crypto/common/keccak.h" #include "crypto/common/portable/mm_malloc.h" diff --git a/src/crypto/cn/CryptoNight_x86.h b/src/crypto/cn/CryptoNight_x86.h index 994ee1168..fc21c7b07 100644 --- a/src/crypto/cn/CryptoNight_x86.h +++ b/src/crypto/cn/CryptoNight_x86.h @@ -36,11 +36,11 @@ #include "common/cpu/Cpu.h" -#include "common/crypto/keccak.h" #include "crypto/cn/CnAlgo.h" #include "crypto/cn/CryptoNight_monero.h" #include "crypto/cn/CryptoNight.h" #include "crypto/cn/soft_aes.h" +#include "crypto/common/keccak.h" extern "C" @@ -785,6 +785,9 @@ extern "C" void cnv2_rwz_double_mainloop_asm(cryptonight_ctx **ctx); namespace xmrig { +typedef void (*cn_mainloop_fun)(cryptonight_ctx **ctx); + + extern cn_mainloop_fun cn_half_mainloop_ivybridge_asm; extern cn_mainloop_fun cn_half_mainloop_ryzen_asm; extern cn_mainloop_fun cn_half_mainloop_bulldozer_asm; diff --git a/src/common/crypto/keccak.cpp b/src/crypto/common/keccak.cpp similarity index 99% rename from src/common/crypto/keccak.cpp rename to src/crypto/common/keccak.cpp index 0219ce366..132ae0a86 100644 --- a/src/common/crypto/keccak.cpp +++ b/src/crypto/common/keccak.cpp @@ -27,7 +27,7 @@ #include -#include "common/crypto/keccak.h" +#include "crypto/common/keccak.h" #define HASH_DATA_AREA 136 diff --git a/src/common/crypto/keccak.h b/src/crypto/common/keccak.h similarity index 100% rename from src/common/crypto/keccak.h rename to src/crypto/common/keccak.h diff --git a/src/net/strategies/DonateStrategy.cpp b/src/net/strategies/DonateStrategy.cpp index 3d9130876..9669db9af 100644 --- a/src/net/strategies/DonateStrategy.cpp +++ b/src/net/strategies/DonateStrategy.cpp @@ -32,11 +32,11 @@ #include "base/net/stratum/strategies/SinglePoolStrategy.h" #include "base/tools/Buffer.h" #include "base/tools/Timer.h" -#include "common/crypto/keccak.h" #include "common/Platform.h" #include "common/xmrig.h" #include "core/config/Config.h" #include "core/Controller.h" +#include "crypto/common/keccak.h" #include "net/Network.h" #include "net/strategies/DonateStrategy.h" #include "rapidjson/document.h"