From 59c85eaf6a504bb6fd3359ec715fcdf2c5dbab59 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Sat, 3 Apr 2021 17:50:52 +0200 Subject: [PATCH 1/2] Fixed compilation for ARM --- src/crypto/randomx/common.hpp | 2 +- src/crypto/randomx/jit_compiler.hpp | 2 +- src/crypto/randomx/randomx.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/crypto/randomx/common.hpp b/src/crypto/randomx/common.hpp index a54081db8..98f96727b 100644 --- a/src/crypto/randomx/common.hpp +++ b/src/crypto/randomx/common.hpp @@ -107,7 +107,7 @@ namespace randomx { #define RANDOMX_HAVE_COMPILER 1 class JitCompilerX86; using JitCompiler = JitCompilerX86; -#elif defined(XMRIG_FEATURE_ASM) && defined(__aarch64__) +#elif defined(__aarch64__) #define RANDOMX_HAVE_COMPILER 1 class JitCompilerA64; using JitCompiler = JitCompilerA64; diff --git a/src/crypto/randomx/jit_compiler.hpp b/src/crypto/randomx/jit_compiler.hpp index 99498254b..db635c6f4 100644 --- a/src/crypto/randomx/jit_compiler.hpp +++ b/src/crypto/randomx/jit_compiler.hpp @@ -30,7 +30,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #if defined(XMRIG_FEATURE_ASM) && (defined(_M_X64) || defined(__x86_64__)) #include "crypto/randomx/jit_compiler_x86.hpp" -#elif defined(XMRIG_FEATURE_ASM) && defined(__aarch64__) +#elif defined(__aarch64__) #include "crypto/randomx/jit_compiler_a64.hpp" #else #include "crypto/randomx/jit_compiler_fallback.hpp" diff --git a/src/crypto/randomx/randomx.cpp b/src/crypto/randomx/randomx.cpp index 365ff60cb..527cca92e 100644 --- a/src/crypto/randomx/randomx.cpp +++ b/src/crypto/randomx/randomx.cpp @@ -262,7 +262,7 @@ typedef void(randomx::JitCompilerX86::* InstructionGeneratorX86_2)(const randomx memcpy(randomx::JitCompilerX86::engine + k, &p, sizeof(p)); \ } while (0) -#elif defined(XMRIG_FEATURE_ASM) && defined(XMRIG_ARMv8) +#elif defined(XMRIG_ARMv8) Log2_ScratchpadL1 = Log2(ScratchpadL1_Size); Log2_ScratchpadL2 = Log2(ScratchpadL2_Size); From 8cae605e1f6de7b3a89caadc4b6c04581a19bc4d Mon Sep 17 00:00:00 2001 From: SChernykh Date: Sat, 3 Apr 2021 17:59:28 +0200 Subject: [PATCH 2/2] Update randomx.cmake --- cmake/randomx.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/randomx.cmake b/cmake/randomx.cmake index 528755970..7038774c6 100644 --- a/cmake/randomx.cmake +++ b/cmake/randomx.cmake @@ -55,7 +55,7 @@ if (WITH_RANDOMX) ) # cheat because cmake and ccache hate each other set_property(SOURCE src/crypto/randomx/jit_compiler_x86_static.S PROPERTY LANGUAGE C) - elseif (WITH_ASM AND XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8) + elseif (XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8) list(APPEND SOURCES_CRYPTO src/crypto/randomx/jit_compiler_a64_static.S src/crypto/randomx/jit_compiler_a64.cpp