From d587eebaf28c3f9085ae49ca3e4602137ec5f6ef Mon Sep 17 00:00:00 2001 From: XMRig Date: Tue, 4 Jun 2019 19:20:33 +0700 Subject: [PATCH] Move files. --- CMakeLists.txt | 38 +++++++++---------- cmake/asm.cmake | 18 ++++----- cmake/cn-gpu.cmake | 10 ++--- src/App.cpp | 1 - src/Mem.cpp | 4 +- src/Mem_unix.cpp | 2 +- src/Mem_win.cpp | 4 +- src/Summary.cpp | 2 +- src/core/config/Config.cpp | 4 +- src/crypto/{ => cn}/Asm.cpp | 2 +- src/crypto/{ => cn}/Asm.h | 0 src/crypto/{ => cn}/CryptoNight.h | 0 src/crypto/{ => cn}/CryptoNight_arm.h | 16 ++++---- src/crypto/{ => cn}/CryptoNight_constants.h | 0 src/crypto/{ => cn}/CryptoNight_monero.h | 2 +- src/crypto/{ => cn}/CryptoNight_test.h | 0 src/crypto/{ => cn}/CryptoNight_x86.h | 16 ++++---- src/crypto/{ => cn}/SSE2NEON.h | 0 .../asm/CryptonightR_soft_aes_template.inc | 0 .../CryptonightR_soft_aes_template_win.inc | 0 .../{ => cn}/asm/CryptonightR_template.S | 0 .../{ => cn}/asm/CryptonightR_template.asm | 0 .../{ => cn}/asm/CryptonightR_template.h | 0 .../{ => cn}/asm/CryptonightR_template.inc | 0 .../asm/CryptonightR_template_win.inc | 0 .../asm/CryptonightWOW_soft_aes_template.inc | 0 .../CryptonightWOW_soft_aes_template_win.inc | 0 .../{ => cn}/asm/CryptonightWOW_template.inc | 0 .../asm/CryptonightWOW_template_win.inc | 0 .../cn2/cnv2_double_main_loop_sandybridge.inc | 0 .../asm/cn2/cnv2_main_loop_bulldozer.inc | 0 .../asm/cn2/cnv2_main_loop_ivybridge.inc | 0 .../{ => cn}/asm/cn2/cnv2_main_loop_ryzen.inc | 0 .../asm/cn2/cnv2_rwz_double_main_loop.inc | 0 .../{ => cn}/asm/cn2/cnv2_rwz_main_loop.inc | 0 src/crypto/{ => cn}/asm/cn_main_loop.S | 0 src/crypto/{ => cn}/asm/cn_main_loop.asm | 0 .../CryptonightR_soft_aes_template_win.inc | 0 .../asm/win64/CryptonightR_template.asm | 0 .../asm/win64/CryptonightR_template_win.inc | 0 .../CryptonightWOW_soft_aes_template_win.inc | 0 .../asm/win64/CryptonightWOW_template_win.inc | 0 .../cn2/cnv2_double_main_loop_sandybridge.inc | 0 .../win64/cn2/cnv2_main_loop_bulldozer.inc | 0 .../win64/cn2/cnv2_main_loop_ivybridge.inc | 0 .../asm/win64/cn2/cnv2_main_loop_ryzen.inc | 0 .../win64/cn2/cnv2_rwz_double_main_loop.inc | 0 .../asm/win64/cn2/cnv2_rwz_main_loop.inc | 0 src/crypto/{ => cn}/asm/win64/cn_main_loop.S | 0 .../{ => cn}/asm/win64/cn_main_loop.asm | 0 src/crypto/{ => cn}/c_blake256.c | 0 src/crypto/{ => cn}/c_blake256.h | 0 src/crypto/{ => cn}/c_groestl.c | 0 src/crypto/{ => cn}/c_groestl.h | 0 src/crypto/{ => cn}/c_jh.c | 0 src/crypto/{ => cn}/c_jh.h | 0 src/crypto/{ => cn}/c_skein.c | 0 src/crypto/{ => cn}/c_skein.h | 0 src/crypto/{ => cn/gpu}/cn_gpu_arm.cpp | 0 src/crypto/{ => cn/gpu}/cn_gpu_avx.cpp | 2 +- src/crypto/{ => cn/gpu}/cn_gpu_ssse3.cpp | 2 +- src/crypto/{ => cn}/groestl_tables.h | 0 src/crypto/{ => cn}/hash.h | 0 src/crypto/{ => cn/r}/CryptonightR_gen.cpp | 4 +- src/crypto/{ => cn/r}/variant4_random_math.h | 2 +- src/crypto/{ => cn}/skein_port.h | 0 src/crypto/{ => cn}/soft_aes.h | 0 src/workers/CpuThread.cpp | 6 +-- src/workers/MultiWorker.cpp | 2 +- src/workers/Workers.cpp | 2 +- 70 files changed, 69 insertions(+), 70 deletions(-) rename src/crypto/{ => cn}/Asm.cpp (98%) rename src/crypto/{ => cn}/Asm.h (100%) rename src/crypto/{ => cn}/CryptoNight.h (100%) rename src/crypto/{ => cn}/CryptoNight_arm.h (99%) rename src/crypto/{ => cn}/CryptoNight_constants.h (100%) rename src/crypto/{ => cn}/CryptoNight_monero.h (99%) rename src/crypto/{ => cn}/CryptoNight_test.h (100%) rename src/crypto/{ => cn}/CryptoNight_x86.h (99%) rename src/crypto/{ => cn}/SSE2NEON.h (100%) rename src/crypto/{ => cn}/asm/CryptonightR_soft_aes_template.inc (100%) rename src/crypto/{ => cn}/asm/CryptonightR_soft_aes_template_win.inc (100%) rename src/crypto/{ => cn}/asm/CryptonightR_template.S (100%) rename src/crypto/{ => cn}/asm/CryptonightR_template.asm (100%) rename src/crypto/{ => cn}/asm/CryptonightR_template.h (100%) rename src/crypto/{ => cn}/asm/CryptonightR_template.inc (100%) rename src/crypto/{ => cn}/asm/CryptonightR_template_win.inc (100%) rename src/crypto/{ => cn}/asm/CryptonightWOW_soft_aes_template.inc (100%) rename src/crypto/{ => cn}/asm/CryptonightWOW_soft_aes_template_win.inc (100%) rename src/crypto/{ => cn}/asm/CryptonightWOW_template.inc (100%) rename src/crypto/{ => cn}/asm/CryptonightWOW_template_win.inc (100%) rename src/crypto/{ => cn}/asm/cn2/cnv2_double_main_loop_sandybridge.inc (100%) rename src/crypto/{ => cn}/asm/cn2/cnv2_main_loop_bulldozer.inc (100%) rename src/crypto/{ => cn}/asm/cn2/cnv2_main_loop_ivybridge.inc (100%) rename src/crypto/{ => cn}/asm/cn2/cnv2_main_loop_ryzen.inc (100%) rename src/crypto/{ => cn}/asm/cn2/cnv2_rwz_double_main_loop.inc (100%) rename src/crypto/{ => cn}/asm/cn2/cnv2_rwz_main_loop.inc (100%) rename src/crypto/{ => cn}/asm/cn_main_loop.S (100%) rename src/crypto/{ => cn}/asm/cn_main_loop.asm (100%) rename src/crypto/{ => cn}/asm/win64/CryptonightR_soft_aes_template_win.inc (100%) rename src/crypto/{ => cn}/asm/win64/CryptonightR_template.asm (100%) rename src/crypto/{ => cn}/asm/win64/CryptonightR_template_win.inc (100%) rename src/crypto/{ => cn}/asm/win64/CryptonightWOW_soft_aes_template_win.inc (100%) rename src/crypto/{ => cn}/asm/win64/CryptonightWOW_template_win.inc (100%) rename src/crypto/{ => cn}/asm/win64/cn2/cnv2_double_main_loop_sandybridge.inc (100%) rename src/crypto/{ => cn}/asm/win64/cn2/cnv2_main_loop_bulldozer.inc (100%) rename src/crypto/{ => cn}/asm/win64/cn2/cnv2_main_loop_ivybridge.inc (100%) rename src/crypto/{ => cn}/asm/win64/cn2/cnv2_main_loop_ryzen.inc (100%) rename src/crypto/{ => cn}/asm/win64/cn2/cnv2_rwz_double_main_loop.inc (100%) rename src/crypto/{ => cn}/asm/win64/cn2/cnv2_rwz_main_loop.inc (100%) rename src/crypto/{ => cn}/asm/win64/cn_main_loop.S (100%) rename src/crypto/{ => cn}/asm/win64/cn_main_loop.asm (100%) rename src/crypto/{ => cn}/c_blake256.c (100%) rename src/crypto/{ => cn}/c_blake256.h (100%) rename src/crypto/{ => cn}/c_groestl.c (100%) rename src/crypto/{ => cn}/c_groestl.h (100%) rename src/crypto/{ => cn}/c_jh.c (100%) rename src/crypto/{ => cn}/c_jh.h (100%) rename src/crypto/{ => cn}/c_skein.c (100%) rename src/crypto/{ => cn}/c_skein.h (100%) rename src/crypto/{ => cn/gpu}/cn_gpu_arm.cpp (100%) rename src/crypto/{ => cn/gpu}/cn_gpu_avx.cpp (99%) rename src/crypto/{ => cn/gpu}/cn_gpu_ssse3.cpp (99%) rename src/crypto/{ => cn}/groestl_tables.h (100%) rename src/crypto/{ => cn}/hash.h (100%) rename src/crypto/{ => cn/r}/CryptonightR_gen.cpp (98%) rename src/crypto/{ => cn/r}/variant4_random_math.h (99%) rename src/crypto/{ => cn}/skein_port.h (100%) rename src/crypto/{ => cn}/soft_aes.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 983eed865..3a764b224 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,27 +55,27 @@ set(HEADERS ) set(HEADERS_CRYPTO - src/crypto/asm/CryptonightR_template.h - src/crypto/c_blake256.h - src/crypto/c_groestl.h - src/crypto/c_jh.h - src/crypto/c_skein.h + src/crypto/cn/asm/CryptonightR_template.h + src/crypto/cn/c_blake256.h + src/crypto/cn/c_groestl.h + src/crypto/cn/c_jh.h + src/crypto/cn/c_skein.h + src/crypto/cn/CryptoNight_constants.h + src/crypto/cn/CryptoNight_monero.h + src/crypto/cn/CryptoNight_test.h + src/crypto/cn/CryptoNight.h + src/crypto/cn/groestl_tables.h + src/crypto/cn/hash.h + src/crypto/cn/skein_port.h + src/crypto/cn/soft_aes.h src/crypto/common/portable/mm_malloc.h src/crypto/common/VirtualMemory.h - src/crypto/CryptoNight_constants.h - src/crypto/CryptoNight_monero.h - src/crypto/CryptoNight_test.h - src/crypto/CryptoNight.h - src/crypto/groestl_tables.h - src/crypto/hash.h - src/crypto/skein_port.h - src/crypto/soft_aes.h ) if (XMRIG_ARM) - set(HEADERS_CRYPTO "${HEADERS_CRYPTO}" src/crypto/CryptoNight_arm.h) + set(HEADERS_CRYPTO "${HEADERS_CRYPTO}" src/crypto/cn/CryptoNight_arm.h) else() - set(HEADERS_CRYPTO "${HEADERS_CRYPTO}" src/crypto/CryptoNight_x86.h) + set(HEADERS_CRYPTO "${HEADERS_CRYPTO}" src/crypto/cn/CryptoNight_x86.h) endif() set(SOURCES @@ -103,10 +103,10 @@ set(SOURCES ) set(SOURCES_CRYPTO - src/crypto/c_groestl.c - src/crypto/c_blake256.c - src/crypto/c_jh.c - src/crypto/c_skein.c + src/crypto/cn/c_groestl.c + src/crypto/cn/c_blake256.c + src/crypto/cn/c_jh.c + src/crypto/cn/c_skein.c ) if (WIN32) diff --git a/cmake/asm.cmake b/cmake/asm.cmake index 389f67231..25ccceadf 100644 --- a/cmake/asm.cmake +++ b/cmake/asm.cmake @@ -6,13 +6,13 @@ if (WITH_ASM AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8) if (MSVC_TOOLSET_VERSION GREATER_EQUAL 141) set(XMRIG_ASM_FILES - "src/crypto/asm/cn_main_loop.asm" - "src/crypto/asm/CryptonightR_template.asm" + "src/crypto/cn/asm/cn_main_loop.asm" + "src/crypto/cn/asm/CryptonightR_template.asm" ) else() set(XMRIG_ASM_FILES - "src/crypto/asm/win64/cn_main_loop.asm" - "src/crypto/asm/win64/CryptonightR_template.asm" + "src/crypto/cn/asm/win64/cn_main_loop.asm" + "src/crypto/cn/asm/win64/CryptonightR_template.asm" ) endif() @@ -22,13 +22,13 @@ if (WITH_ASM AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8) if (WIN32 AND CMAKE_C_COMPILER_ID MATCHES GNU) set(XMRIG_ASM_FILES - "src/crypto/asm/win64/cn_main_loop.S" - "src/crypto/asm/CryptonightR_template.S" + "src/crypto/cn/asm/win64/cn_main_loop.S" + "src/crypto/cn/asm/CryptonightR_template.S" ) else() set(XMRIG_ASM_FILES - "src/crypto/asm/cn_main_loop.S" - "src/crypto/asm/CryptonightR_template.S" + "src/crypto/cn/asm/cn_main_loop.S" + "src/crypto/cn/asm/CryptonightR_template.S" ) endif() @@ -36,7 +36,7 @@ if (WITH_ASM AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8) endif() add_library(${XMRIG_ASM_LIBRARY} STATIC ${XMRIG_ASM_FILES}) - set(XMRIG_ASM_SOURCES src/crypto/Asm.h src/crypto/Asm.cpp src/crypto/CryptonightR_gen.cpp) + set(XMRIG_ASM_SOURCES src/crypto/cn/Asm.h src/crypto/cn/Asm.cpp src/crypto/cn/r/CryptonightR_gen.cpp) set_property(TARGET ${XMRIG_ASM_LIBRARY} PROPERTY LINKER_LANGUAGE C) else() set(XMRIG_ASM_SOURCES "") diff --git a/cmake/cn-gpu.cmake b/cmake/cn-gpu.cmake index b529f0b2d..8f107bf00 100644 --- a/cmake/cn-gpu.cmake +++ b/cmake/cn-gpu.cmake @@ -4,16 +4,16 @@ if (WITH_CN_GPU AND CMAKE_SIZEOF_VOID_P EQUAL 8) set(CN_GPU_SOURCES src/crypto/cn_gpu_arm.cpp) if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang) - set_source_files_properties(src/crypto/cn_gpu_arm.cpp PROPERTIES COMPILE_FLAGS "-O3") + set_source_files_properties(src/crypto/cn/gpu/cn_gpu_arm.cpp PROPERTIES COMPILE_FLAGS "-O3") endif() else() - set(CN_GPU_SOURCES src/crypto/cn_gpu_avx.cpp src/crypto/cn_gpu_ssse3.cpp) + set(CN_GPU_SOURCES src/crypto/cn/gpu/cn_gpu_avx.cpp src/crypto/cn/gpu/cn_gpu_ssse3.cpp) if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang) - set_source_files_properties(src/crypto/cn_gpu_avx.cpp PROPERTIES COMPILE_FLAGS "-O3 -mavx2") - set_source_files_properties(src/crypto/cn_gpu_ssse3.cpp PROPERTIES COMPILE_FLAGS "-O3") + set_source_files_properties(src/crypto/cn/gpu/cn_gpu_avx.cpp PROPERTIES COMPILE_FLAGS "-O3 -mavx2") + set_source_files_properties(src/crypto/cn/gpu/cn_gpu_ssse3.cpp PROPERTIES COMPILE_FLAGS "-O3") elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC) - set_source_files_properties(src/crypto/cn_gpu_avx.cpp PROPERTIES COMPILE_FLAGS "/arch:AVX") + set_source_files_properties(src/crypto/cn/gpu/cn_gpu_avx.cpp PROPERTIES COMPILE_FLAGS "/arch:AVX") endif() endif() else() diff --git a/src/App.cpp b/src/App.cpp index 38e335c28..66662eb1e 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -37,7 +37,6 @@ #include "common/Platform.h" #include "core/config/Config.h" #include "core/Controller.h" -#include "crypto/CryptoNight.h" #include "Mem.h" #include "net/Network.h" #include "Summary.h" diff --git a/src/Mem.cpp b/src/Mem.cpp index 2c78e10dc..b9e0fbf96 100644 --- a/src/Mem.cpp +++ b/src/Mem.cpp @@ -27,10 +27,10 @@ #include +#include "crypto/cn/CryptoNight_constants.h" +#include "crypto/cn/CryptoNight.h" #include "crypto/common/portable/mm_malloc.h" #include "crypto/common/VirtualMemory.h" -#include "crypto/CryptoNight_constants.h" -#include "crypto/CryptoNight.h" #include "Mem.h" diff --git a/src/Mem_unix.cpp b/src/Mem_unix.cpp index d9c3e31f3..9bdce0f5a 100644 --- a/src/Mem_unix.cpp +++ b/src/Mem_unix.cpp @@ -32,7 +32,7 @@ #include "common/xmrig.h" #include "crypto/common/portable/mm_malloc.h" #include "crypto/common/VirtualMemory.h" -#include "crypto/CryptoNight.h" +#include "crypto/cn/CryptoNight.h" #include "Mem.h" diff --git a/src/Mem_win.cpp b/src/Mem_win.cpp index 3e8b6ee78..76cbf4345 100644 --- a/src/Mem_win.cpp +++ b/src/Mem_win.cpp @@ -34,8 +34,8 @@ #include "common/xmrig.h" #include "crypto/common/portable/mm_malloc.h" #include "crypto/common/VirtualMemory.h" -#include "crypto/CryptoNight_constants.h" -#include "crypto/CryptoNight.h" +#include "crypto/cn/CryptoNight_constants.h" +#include "crypto/cn/CryptoNight.h" #include "Mem.h" diff --git a/src/Summary.cpp b/src/Summary.cpp index 697e23736..2b28f98de 100644 --- a/src/Summary.cpp +++ b/src/Summary.cpp @@ -33,7 +33,7 @@ #include "common/cpu/Cpu.h" #include "core/config/Config.h" #include "core/Controller.h" -#include "crypto/Asm.h" +#include "crypto/cn/Asm.h" #include "Mem.h" #include "Summary.h" #include "version.h" diff --git a/src/core/config/Config.cpp b/src/core/config/Config.cpp index 88ddbb72f..a3612ed85 100644 --- a/src/core/config/Config.cpp +++ b/src/core/config/Config.cpp @@ -32,8 +32,8 @@ #include "base/kernel/interfaces/IJsonReader.h" #include "common/cpu/Cpu.h" #include "core/config/Config.h" -#include "crypto/Asm.h" -#include "crypto/CryptoNight_constants.h" +#include "crypto/cn/Asm.h" +#include "crypto/cn/CryptoNight_constants.h" #include "rapidjson/document.h" #include "rapidjson/filewritestream.h" #include "rapidjson/prettywriter.h" diff --git a/src/crypto/Asm.cpp b/src/crypto/cn/Asm.cpp similarity index 98% rename from src/crypto/Asm.cpp rename to src/crypto/cn/Asm.cpp index 88812c6c1..331c133dd 100644 --- a/src/crypto/Asm.cpp +++ b/src/crypto/cn/Asm.cpp @@ -33,7 +33,7 @@ #endif -#include "crypto/Asm.h" +#include "crypto/cn/Asm.h" #include "rapidjson/document.h" diff --git a/src/crypto/Asm.h b/src/crypto/cn/Asm.h similarity index 100% rename from src/crypto/Asm.h rename to src/crypto/cn/Asm.h diff --git a/src/crypto/CryptoNight.h b/src/crypto/cn/CryptoNight.h similarity index 100% rename from src/crypto/CryptoNight.h rename to src/crypto/cn/CryptoNight.h diff --git a/src/crypto/CryptoNight_arm.h b/src/crypto/cn/CryptoNight_arm.h similarity index 99% rename from src/crypto/CryptoNight_arm.h rename to src/crypto/cn/CryptoNight_arm.h index 7be8c53ff..e08c02ded 100644 --- a/src/crypto/CryptoNight_arm.h +++ b/src/crypto/cn/CryptoNight_arm.h @@ -30,18 +30,18 @@ #include "common/crypto/keccak.h" #include "crypto/common/portable/mm_malloc.h" -#include "crypto/CryptoNight_constants.h" -#include "crypto/CryptoNight_monero.h" -#include "crypto/CryptoNight.h" -#include "crypto/soft_aes.h" +#include "crypto/cn/CryptoNight_constants.h" +#include "crypto/cn/CryptoNight_monero.h" +#include "crypto/cn/CryptoNight.h" +#include "crypto/cn/soft_aes.h" extern "C" { -#include "crypto/c_groestl.h" -#include "crypto/c_blake256.h" -#include "crypto/c_jh.h" -#include "crypto/c_skein.h" +#include "crypto/cn/c_groestl.h" +#include "crypto/cn/c_blake256.h" +#include "crypto/cn/c_jh.h" +#include "crypto/cn/c_skein.h" } diff --git a/src/crypto/CryptoNight_constants.h b/src/crypto/cn/CryptoNight_constants.h similarity index 100% rename from src/crypto/CryptoNight_constants.h rename to src/crypto/cn/CryptoNight_constants.h diff --git a/src/crypto/CryptoNight_monero.h b/src/crypto/cn/CryptoNight_monero.h similarity index 99% rename from src/crypto/CryptoNight_monero.h rename to src/crypto/cn/CryptoNight_monero.h index 4e84ac5d0..94a18c458 100644 --- a/src/crypto/CryptoNight_monero.h +++ b/src/crypto/cn/CryptoNight_monero.h @@ -179,7 +179,7 @@ #endif #include "common/xmrig.h" -#include "variant4_random_math.h" +#include "crypto/cn/r/variant4_random_math.h" #define VARIANT4_RANDOM_MATH_INIT(part) \ uint32_t r##part[9]; \ diff --git a/src/crypto/CryptoNight_test.h b/src/crypto/cn/CryptoNight_test.h similarity index 100% rename from src/crypto/CryptoNight_test.h rename to src/crypto/cn/CryptoNight_test.h diff --git a/src/crypto/CryptoNight_x86.h b/src/crypto/cn/CryptoNight_x86.h similarity index 99% rename from src/crypto/CryptoNight_x86.h rename to src/crypto/cn/CryptoNight_x86.h index 390f203b1..c3a89dac5 100644 --- a/src/crypto/CryptoNight_x86.h +++ b/src/crypto/cn/CryptoNight_x86.h @@ -37,18 +37,18 @@ #include "common/cpu/Cpu.h" #include "common/crypto/keccak.h" -#include "crypto/CryptoNight.h" -#include "crypto/CryptoNight_constants.h" -#include "crypto/CryptoNight_monero.h" -#include "crypto/soft_aes.h" +#include "crypto/cn/CryptoNight.h" +#include "crypto/cn/CryptoNight_constants.h" +#include "crypto/cn/CryptoNight_monero.h" +#include "crypto/cn/soft_aes.h" extern "C" { -#include "crypto/c_groestl.h" -#include "crypto/c_blake256.h" -#include "crypto/c_jh.h" -#include "crypto/c_skein.h" +#include "crypto/cn/c_groestl.h" +#include "crypto/cn/c_blake256.h" +#include "crypto/cn/c_jh.h" +#include "crypto/cn/c_skein.h" } diff --git a/src/crypto/SSE2NEON.h b/src/crypto/cn/SSE2NEON.h similarity index 100% rename from src/crypto/SSE2NEON.h rename to src/crypto/cn/SSE2NEON.h diff --git a/src/crypto/asm/CryptonightR_soft_aes_template.inc b/src/crypto/cn/asm/CryptonightR_soft_aes_template.inc similarity index 100% rename from src/crypto/asm/CryptonightR_soft_aes_template.inc rename to src/crypto/cn/asm/CryptonightR_soft_aes_template.inc diff --git a/src/crypto/asm/CryptonightR_soft_aes_template_win.inc b/src/crypto/cn/asm/CryptonightR_soft_aes_template_win.inc similarity index 100% rename from src/crypto/asm/CryptonightR_soft_aes_template_win.inc rename to src/crypto/cn/asm/CryptonightR_soft_aes_template_win.inc diff --git a/src/crypto/asm/CryptonightR_template.S b/src/crypto/cn/asm/CryptonightR_template.S similarity index 100% rename from src/crypto/asm/CryptonightR_template.S rename to src/crypto/cn/asm/CryptonightR_template.S diff --git a/src/crypto/asm/CryptonightR_template.asm b/src/crypto/cn/asm/CryptonightR_template.asm similarity index 100% rename from src/crypto/asm/CryptonightR_template.asm rename to src/crypto/cn/asm/CryptonightR_template.asm diff --git a/src/crypto/asm/CryptonightR_template.h b/src/crypto/cn/asm/CryptonightR_template.h similarity index 100% rename from src/crypto/asm/CryptonightR_template.h rename to src/crypto/cn/asm/CryptonightR_template.h diff --git a/src/crypto/asm/CryptonightR_template.inc b/src/crypto/cn/asm/CryptonightR_template.inc similarity index 100% rename from src/crypto/asm/CryptonightR_template.inc rename to src/crypto/cn/asm/CryptonightR_template.inc diff --git a/src/crypto/asm/CryptonightR_template_win.inc b/src/crypto/cn/asm/CryptonightR_template_win.inc similarity index 100% rename from src/crypto/asm/CryptonightR_template_win.inc rename to src/crypto/cn/asm/CryptonightR_template_win.inc diff --git a/src/crypto/asm/CryptonightWOW_soft_aes_template.inc b/src/crypto/cn/asm/CryptonightWOW_soft_aes_template.inc similarity index 100% rename from src/crypto/asm/CryptonightWOW_soft_aes_template.inc rename to src/crypto/cn/asm/CryptonightWOW_soft_aes_template.inc diff --git a/src/crypto/asm/CryptonightWOW_soft_aes_template_win.inc b/src/crypto/cn/asm/CryptonightWOW_soft_aes_template_win.inc similarity index 100% rename from src/crypto/asm/CryptonightWOW_soft_aes_template_win.inc rename to src/crypto/cn/asm/CryptonightWOW_soft_aes_template_win.inc diff --git a/src/crypto/asm/CryptonightWOW_template.inc b/src/crypto/cn/asm/CryptonightWOW_template.inc similarity index 100% rename from src/crypto/asm/CryptonightWOW_template.inc rename to src/crypto/cn/asm/CryptonightWOW_template.inc diff --git a/src/crypto/asm/CryptonightWOW_template_win.inc b/src/crypto/cn/asm/CryptonightWOW_template_win.inc similarity index 100% rename from src/crypto/asm/CryptonightWOW_template_win.inc rename to src/crypto/cn/asm/CryptonightWOW_template_win.inc diff --git a/src/crypto/asm/cn2/cnv2_double_main_loop_sandybridge.inc b/src/crypto/cn/asm/cn2/cnv2_double_main_loop_sandybridge.inc similarity index 100% rename from src/crypto/asm/cn2/cnv2_double_main_loop_sandybridge.inc rename to src/crypto/cn/asm/cn2/cnv2_double_main_loop_sandybridge.inc diff --git a/src/crypto/asm/cn2/cnv2_main_loop_bulldozer.inc b/src/crypto/cn/asm/cn2/cnv2_main_loop_bulldozer.inc similarity index 100% rename from src/crypto/asm/cn2/cnv2_main_loop_bulldozer.inc rename to src/crypto/cn/asm/cn2/cnv2_main_loop_bulldozer.inc diff --git a/src/crypto/asm/cn2/cnv2_main_loop_ivybridge.inc b/src/crypto/cn/asm/cn2/cnv2_main_loop_ivybridge.inc similarity index 100% rename from src/crypto/asm/cn2/cnv2_main_loop_ivybridge.inc rename to src/crypto/cn/asm/cn2/cnv2_main_loop_ivybridge.inc diff --git a/src/crypto/asm/cn2/cnv2_main_loop_ryzen.inc b/src/crypto/cn/asm/cn2/cnv2_main_loop_ryzen.inc similarity index 100% rename from src/crypto/asm/cn2/cnv2_main_loop_ryzen.inc rename to src/crypto/cn/asm/cn2/cnv2_main_loop_ryzen.inc diff --git a/src/crypto/asm/cn2/cnv2_rwz_double_main_loop.inc b/src/crypto/cn/asm/cn2/cnv2_rwz_double_main_loop.inc similarity index 100% rename from src/crypto/asm/cn2/cnv2_rwz_double_main_loop.inc rename to src/crypto/cn/asm/cn2/cnv2_rwz_double_main_loop.inc diff --git a/src/crypto/asm/cn2/cnv2_rwz_main_loop.inc b/src/crypto/cn/asm/cn2/cnv2_rwz_main_loop.inc similarity index 100% rename from src/crypto/asm/cn2/cnv2_rwz_main_loop.inc rename to src/crypto/cn/asm/cn2/cnv2_rwz_main_loop.inc diff --git a/src/crypto/asm/cn_main_loop.S b/src/crypto/cn/asm/cn_main_loop.S similarity index 100% rename from src/crypto/asm/cn_main_loop.S rename to src/crypto/cn/asm/cn_main_loop.S diff --git a/src/crypto/asm/cn_main_loop.asm b/src/crypto/cn/asm/cn_main_loop.asm similarity index 100% rename from src/crypto/asm/cn_main_loop.asm rename to src/crypto/cn/asm/cn_main_loop.asm diff --git a/src/crypto/asm/win64/CryptonightR_soft_aes_template_win.inc b/src/crypto/cn/asm/win64/CryptonightR_soft_aes_template_win.inc similarity index 100% rename from src/crypto/asm/win64/CryptonightR_soft_aes_template_win.inc rename to src/crypto/cn/asm/win64/CryptonightR_soft_aes_template_win.inc diff --git a/src/crypto/asm/win64/CryptonightR_template.asm b/src/crypto/cn/asm/win64/CryptonightR_template.asm similarity index 100% rename from src/crypto/asm/win64/CryptonightR_template.asm rename to src/crypto/cn/asm/win64/CryptonightR_template.asm diff --git a/src/crypto/asm/win64/CryptonightR_template_win.inc b/src/crypto/cn/asm/win64/CryptonightR_template_win.inc similarity index 100% rename from src/crypto/asm/win64/CryptonightR_template_win.inc rename to src/crypto/cn/asm/win64/CryptonightR_template_win.inc diff --git a/src/crypto/asm/win64/CryptonightWOW_soft_aes_template_win.inc b/src/crypto/cn/asm/win64/CryptonightWOW_soft_aes_template_win.inc similarity index 100% rename from src/crypto/asm/win64/CryptonightWOW_soft_aes_template_win.inc rename to src/crypto/cn/asm/win64/CryptonightWOW_soft_aes_template_win.inc diff --git a/src/crypto/asm/win64/CryptonightWOW_template_win.inc b/src/crypto/cn/asm/win64/CryptonightWOW_template_win.inc similarity index 100% rename from src/crypto/asm/win64/CryptonightWOW_template_win.inc rename to src/crypto/cn/asm/win64/CryptonightWOW_template_win.inc diff --git a/src/crypto/asm/win64/cn2/cnv2_double_main_loop_sandybridge.inc b/src/crypto/cn/asm/win64/cn2/cnv2_double_main_loop_sandybridge.inc similarity index 100% rename from src/crypto/asm/win64/cn2/cnv2_double_main_loop_sandybridge.inc rename to src/crypto/cn/asm/win64/cn2/cnv2_double_main_loop_sandybridge.inc diff --git a/src/crypto/asm/win64/cn2/cnv2_main_loop_bulldozer.inc b/src/crypto/cn/asm/win64/cn2/cnv2_main_loop_bulldozer.inc similarity index 100% rename from src/crypto/asm/win64/cn2/cnv2_main_loop_bulldozer.inc rename to src/crypto/cn/asm/win64/cn2/cnv2_main_loop_bulldozer.inc diff --git a/src/crypto/asm/win64/cn2/cnv2_main_loop_ivybridge.inc b/src/crypto/cn/asm/win64/cn2/cnv2_main_loop_ivybridge.inc similarity index 100% rename from src/crypto/asm/win64/cn2/cnv2_main_loop_ivybridge.inc rename to src/crypto/cn/asm/win64/cn2/cnv2_main_loop_ivybridge.inc diff --git a/src/crypto/asm/win64/cn2/cnv2_main_loop_ryzen.inc b/src/crypto/cn/asm/win64/cn2/cnv2_main_loop_ryzen.inc similarity index 100% rename from src/crypto/asm/win64/cn2/cnv2_main_loop_ryzen.inc rename to src/crypto/cn/asm/win64/cn2/cnv2_main_loop_ryzen.inc diff --git a/src/crypto/asm/win64/cn2/cnv2_rwz_double_main_loop.inc b/src/crypto/cn/asm/win64/cn2/cnv2_rwz_double_main_loop.inc similarity index 100% rename from src/crypto/asm/win64/cn2/cnv2_rwz_double_main_loop.inc rename to src/crypto/cn/asm/win64/cn2/cnv2_rwz_double_main_loop.inc diff --git a/src/crypto/asm/win64/cn2/cnv2_rwz_main_loop.inc b/src/crypto/cn/asm/win64/cn2/cnv2_rwz_main_loop.inc similarity index 100% rename from src/crypto/asm/win64/cn2/cnv2_rwz_main_loop.inc rename to src/crypto/cn/asm/win64/cn2/cnv2_rwz_main_loop.inc diff --git a/src/crypto/asm/win64/cn_main_loop.S b/src/crypto/cn/asm/win64/cn_main_loop.S similarity index 100% rename from src/crypto/asm/win64/cn_main_loop.S rename to src/crypto/cn/asm/win64/cn_main_loop.S diff --git a/src/crypto/asm/win64/cn_main_loop.asm b/src/crypto/cn/asm/win64/cn_main_loop.asm similarity index 100% rename from src/crypto/asm/win64/cn_main_loop.asm rename to src/crypto/cn/asm/win64/cn_main_loop.asm diff --git a/src/crypto/c_blake256.c b/src/crypto/cn/c_blake256.c similarity index 100% rename from src/crypto/c_blake256.c rename to src/crypto/cn/c_blake256.c diff --git a/src/crypto/c_blake256.h b/src/crypto/cn/c_blake256.h similarity index 100% rename from src/crypto/c_blake256.h rename to src/crypto/cn/c_blake256.h diff --git a/src/crypto/c_groestl.c b/src/crypto/cn/c_groestl.c similarity index 100% rename from src/crypto/c_groestl.c rename to src/crypto/cn/c_groestl.c diff --git a/src/crypto/c_groestl.h b/src/crypto/cn/c_groestl.h similarity index 100% rename from src/crypto/c_groestl.h rename to src/crypto/cn/c_groestl.h diff --git a/src/crypto/c_jh.c b/src/crypto/cn/c_jh.c similarity index 100% rename from src/crypto/c_jh.c rename to src/crypto/cn/c_jh.c diff --git a/src/crypto/c_jh.h b/src/crypto/cn/c_jh.h similarity index 100% rename from src/crypto/c_jh.h rename to src/crypto/cn/c_jh.h diff --git a/src/crypto/c_skein.c b/src/crypto/cn/c_skein.c similarity index 100% rename from src/crypto/c_skein.c rename to src/crypto/cn/c_skein.c diff --git a/src/crypto/c_skein.h b/src/crypto/cn/c_skein.h similarity index 100% rename from src/crypto/c_skein.h rename to src/crypto/cn/c_skein.h diff --git a/src/crypto/cn_gpu_arm.cpp b/src/crypto/cn/gpu/cn_gpu_arm.cpp similarity index 100% rename from src/crypto/cn_gpu_arm.cpp rename to src/crypto/cn/gpu/cn_gpu_arm.cpp diff --git a/src/crypto/cn_gpu_avx.cpp b/src/crypto/cn/gpu/cn_gpu_avx.cpp similarity index 99% rename from src/crypto/cn_gpu_avx.cpp rename to src/crypto/cn/gpu/cn_gpu_avx.cpp index 9f801c80a..382be5708 100644 --- a/src/crypto/cn_gpu_avx.cpp +++ b/src/crypto/cn/gpu/cn_gpu_avx.cpp @@ -22,7 +22,7 @@ * along with this program. If not, see . */ -#include "crypto/CryptoNight_constants.h" +#include "crypto/cn/CryptoNight_constants.h" #ifdef __GNUC__ # include diff --git a/src/crypto/cn_gpu_ssse3.cpp b/src/crypto/cn/gpu/cn_gpu_ssse3.cpp similarity index 99% rename from src/crypto/cn_gpu_ssse3.cpp rename to src/crypto/cn/gpu/cn_gpu_ssse3.cpp index ce3d19add..42a11a1d3 100644 --- a/src/crypto/cn_gpu_ssse3.cpp +++ b/src/crypto/cn/gpu/cn_gpu_ssse3.cpp @@ -22,7 +22,7 @@ * along with this program. If not, see . */ -#include "crypto/CryptoNight_constants.h" +#include "crypto/cn/CryptoNight_constants.h" #ifdef __GNUC__ # include diff --git a/src/crypto/groestl_tables.h b/src/crypto/cn/groestl_tables.h similarity index 100% rename from src/crypto/groestl_tables.h rename to src/crypto/cn/groestl_tables.h diff --git a/src/crypto/hash.h b/src/crypto/cn/hash.h similarity index 100% rename from src/crypto/hash.h rename to src/crypto/cn/hash.h diff --git a/src/crypto/CryptonightR_gen.cpp b/src/crypto/cn/r/CryptonightR_gen.cpp similarity index 98% rename from src/crypto/CryptonightR_gen.cpp rename to src/crypto/cn/r/CryptonightR_gen.cpp index 5352cf0a3..8491a33bf 100644 --- a/src/crypto/CryptonightR_gen.cpp +++ b/src/crypto/cn/r/CryptonightR_gen.cpp @@ -24,11 +24,11 @@ */ #include -#include "crypto/CryptoNight_monero.h" +#include "crypto/cn/CryptoNight_monero.h" typedef void(*void_func)(); -#include "crypto/asm/CryptonightR_template.h" +#include "crypto/cn/asm/CryptonightR_template.h" #include "crypto/common/VirtualMemory.h" #include "Mem.h" diff --git a/src/crypto/variant4_random_math.h b/src/crypto/cn/r/variant4_random_math.h similarity index 99% rename from src/crypto/variant4_random_math.h rename to src/crypto/cn/r/variant4_random_math.h index 1f3ea0ac3..c384df7a5 100644 --- a/src/crypto/variant4_random_math.h +++ b/src/crypto/cn/r/variant4_random_math.h @@ -3,7 +3,7 @@ extern "C" { - #include "c_blake256.h" + #include "crypto/cn/c_blake256.h" } enum V4_Settings diff --git a/src/crypto/skein_port.h b/src/crypto/cn/skein_port.h similarity index 100% rename from src/crypto/skein_port.h rename to src/crypto/cn/skein_port.h diff --git a/src/crypto/soft_aes.h b/src/crypto/cn/soft_aes.h similarity index 100% rename from src/crypto/soft_aes.h rename to src/crypto/cn/soft_aes.h diff --git a/src/workers/CpuThread.cpp b/src/workers/CpuThread.cpp index fbdd8b646..ddcb36f9c 100644 --- a/src/workers/CpuThread.cpp +++ b/src/workers/CpuThread.cpp @@ -27,7 +27,7 @@ #include "base/io/log/Log.h" #include "common/cpu/Cpu.h" -#include "crypto/Asm.h" +#include "crypto/cn/Asm.h" #include "crypto/common/VirtualMemory.h" #include "Mem.h" #include "rapidjson/document.h" @@ -35,9 +35,9 @@ #if defined(XMRIG_ARM) -# include "crypto/CryptoNight_arm.h" +# include "crypto/cn/CryptoNight_arm.h" #else -# include "crypto/CryptoNight_x86.h" +# include "crypto/cn/CryptoNight_x86.h" #endif diff --git a/src/workers/MultiWorker.cpp b/src/workers/MultiWorker.cpp index 8b9e0881a..b71ed0762 100644 --- a/src/workers/MultiWorker.cpp +++ b/src/workers/MultiWorker.cpp @@ -27,7 +27,7 @@ #include -#include "crypto/CryptoNight_test.h" +#include "crypto/cn/CryptoNight_test.h" #include "workers/CpuThread.h" #include "workers/MultiWorker.h" #include "workers/Workers.h" diff --git a/src/workers/Workers.cpp b/src/workers/Workers.cpp index 539901354..b95d8b852 100644 --- a/src/workers/Workers.cpp +++ b/src/workers/Workers.cpp @@ -32,7 +32,7 @@ #include "base/tools/Handle.h" #include "core/config/Config.h" #include "core/Controller.h" -#include "crypto/CryptoNight_constants.h" +#include "crypto/cn/CryptoNight_constants.h" #include "interfaces/IJobResultListener.h" #include "interfaces/IThread.h" #include "Mem.h"